Implement RFC 11: Redesigning Wasmtime's APIs (#2897)
Implement Wasmtime's new API as designed by RFC 11. This is quite a large commit which has had lots of discussion externally, so for more information it's best to read the RFC thread and the PR thread.
This commit is contained in:
@@ -3,21 +3,4 @@ mod r#impl;
|
||||
mod witx;
|
||||
|
||||
pub use ctx::WasiNnCtx;
|
||||
|
||||
// Defines a `struct WasiNn` with member fields and appropriate APIs for dealing with all the
|
||||
// various WASI exports.
|
||||
wasmtime_wiggle::wasmtime_integration!({
|
||||
// The wiggle code to integrate with lives here:
|
||||
target: witx,
|
||||
// This must be the same witx document as used above:
|
||||
witx: ["$WASI_ROOT/phases/ephemeral/witx/wasi_ephemeral_nn.witx"],
|
||||
// This must be the same ctx type as used for the target:
|
||||
ctx: WasiNnCtx,
|
||||
// This macro will emit a struct to represent the instance, with this name and docs:
|
||||
modules: {
|
||||
wasi_ephemeral_nn => {
|
||||
name: WasiNn,
|
||||
docs: "An instantiated instance of the wasi-nn exports.",
|
||||
}
|
||||
},
|
||||
});
|
||||
pub use witx::wasi_ephemeral_nn::add_to_linker;
|
||||
|
||||
Reference in New Issue
Block a user