Browse Source

Tidy up some documentation comments.

pull/42/head
Dan Gohman 6 years ago
parent
commit
c66a3c23f3
  1. 2
      README.md
  2. 4
      lib/environ/src/compilation.rs
  3. 2
      lib/environ/src/func_environ.rs
  4. 2
      lib/runtime/src/instance.rs
  5. 2
      lib/wast/src/wast.rs

2
README.md

@ -14,7 +14,7 @@ utility or as a library embedded in a larger application.
[![Gitter chat](https://badges.gitter.im/CraneStation/CraneStation.svg)](https://gitter.im/CraneStation/Lobby) [![Gitter chat](https://badges.gitter.im/CraneStation/CraneStation.svg)](https://gitter.im/CraneStation/Lobby)
![Minimum rustc 1.30](https://img.shields.io/badge/rustc-1.30+-green.svg) ![Minimum rustc 1.30](https://img.shields.io/badge/rustc-1.30+-green.svg)
*Wasmtime is complete enough to pass the WebAssemlbly spec testsuite.* Support for *Wasmtime is complete enough to pass the WebAssembly spec testsuite.* Support for
system APIs is coming soon! system APIs is coming soon!
One goal for this project is to implement [CloudABI](https://cloudabi.org/) using One goal for this project is to implement [CloudABI](https://cloudabi.org/) using

4
lib/environ/src/compilation.rs

@ -8,7 +8,7 @@ use cranelift_entity::PrimaryMap;
use cranelift_wasm::{DefinedFuncIndex, FuncIndex, WasmError}; use cranelift_wasm::{DefinedFuncIndex, FuncIndex, WasmError};
use std::vec::Vec; use std::vec::Vec;
/// The result of compiling a WebAssemby module's functions. /// The result of compiling a WebAssembly module's functions.
#[derive(Debug)] #[derive(Debug)]
pub struct Compilation { pub struct Compilation {
/// Compiled machine code for the function bodies. /// Compiled machine code for the function bodies.
@ -35,7 +35,7 @@ pub struct Relocation {
pub addend: binemit::Addend, pub addend: binemit::Addend,
} }
/// Destination function. Can be either user function or some special one, like grow_memory. /// Destination function. Can be either user function or some special one, like `memory.grow`.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub enum RelocationTarget { pub enum RelocationTarget {
/// The user function index. /// The user function index.

2
lib/environ/src/func_environ.rs

@ -48,7 +48,7 @@ pub fn get_imported_memory32_size_name() -> ir::ExternalName {
ir::ExternalName::user(1, 3) ir::ExternalName::user(1, 3)
} }
/// The FuncEnvironment implementation for use by the `ModuleEnvironment`. /// The `FuncEnvironment` implementation for use by the `ModuleEnvironment`.
pub struct FuncEnvironment<'module_environment> { pub struct FuncEnvironment<'module_environment> {
/// Target-specified configuration. /// Target-specified configuration.
target_config: TargetFrontendConfig, target_config: TargetFrontendConfig,

2
lib/runtime/src/instance.rs

@ -422,7 +422,7 @@ impl Drop for MmapField {
} }
} }
/// An Instance of a WebAssemby module. /// An Instance of a WebAssembly module.
/// ///
/// Note that compiled wasm code passes around raw pointers to `Instance`, so /// Note that compiled wasm code passes around raw pointers to `Instance`, so
/// this shouldn't be moved. /// this shouldn't be moved.

2
lib/wast/src/wast.rs

@ -9,7 +9,7 @@ use wasmtime_jit::{
Namespace, RuntimeValue, SetupError, Namespace, RuntimeValue, SetupError,
}; };
/// Translate from a script::Value to a RuntimeValue. /// Translate from a `script::Value` to a `RuntimeValue`.
fn runtime_value(v: Value) -> RuntimeValue { fn runtime_value(v: Value) -> RuntimeValue {
match v { match v {
Value::I32(x) => RuntimeValue::I32(x), Value::I32(x) => RuntimeValue::I32(x),

Loading…
Cancel
Save