factor the docs out as well

This commit is contained in:
Pat Hickey
2020-06-22 19:27:31 -07:00
parent 6adbae3007
commit cde32070fc
3 changed files with 102 additions and 36 deletions

View File

@@ -9,7 +9,16 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder};
wasmtime_wiggle::define_struct_for_wiggle!({
witx: ["../wasi-common/WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
ctx: WasiCtx,
instance: Wasi,
instance: {
name: Wasi,
docs: "An instantiated instance of the wasi exports.
This represents a wasi module which can be used to instantiate other
wasm modules. This structure exports all that various fields of the
wasi instance as fields which can be used to implement your own
instantiation logic, if necessary. Additionally [`Wasi::get_export`]
can be used to do name-based resolution."
}
});
pub fn is_wasi_module(name: &str) -> bool {