From 3d65656f8503600b93e5e5c07200b12e610b6c4e Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Sat, 19 Jan 2019 01:03:07 -0600 Subject: [PATCH] Documentation and style in runtime --- lib/runtime/src/export.rs | 2 +- lib/runtime/src/instance.rs | 1 + lib/runtime/src/lib.rs | 2 +- lib/runtime/src/module.rs | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/runtime/src/export.rs b/lib/runtime/src/export.rs index 521391785..8f69fbc73 100644 --- a/lib/runtime/src/export.rs +++ b/lib/runtime/src/export.rs @@ -111,7 +111,7 @@ impl<'a> ExportIter<'a> { Self { inner, iter: module.exports.iter(), - module: module, + module, } } } diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index d809b9cba..1923c84fd 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -24,6 +24,7 @@ pub(crate) struct InstanceInner { vmctx: Box, } +/// A WebAssembly instance pub struct Instance { pub module: Rc, inner: Box, diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 624a561e9..a841ed5e5 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -31,7 +31,7 @@ pub use self::instance::Instance; pub use self::module::Module; use std::rc::Rc; -/// Compile a webassembly module using the provided compiler. +/// Compile a WebAssembly module using the provided compiler. pub fn compile(wasm: &[u8], compiler: &dyn backend::Compiler) -> CompileResult { compiler .compile(wasm) diff --git a/lib/runtime/src/module.rs b/lib/runtime/src/module.rs index 7ca3e30bf..975a0874c 100644 --- a/lib/runtime/src/module.rs +++ b/lib/runtime/src/module.rs @@ -14,7 +14,7 @@ use crate::{ use hashbrown::HashMap; use std::rc::Rc; -/// This is used to instantiate a new webassembly module. +/// This is used to instantiate a new WebAssembly module. #[doc(hidden)] pub struct ModuleInner { pub func_resolver: Box, @@ -47,7 +47,7 @@ impl Module { Module(inner) } - /// Instantiate a webassembly module with the provided imports. + /// Instantiate a WebAssembly module with the provided imports. pub fn instantiate(&self, imports: Imports) -> Result { Instance::new(Rc::clone(&self.0), Box::new(imports)) }