The context of the currently running WebAssembly instance.
This exposes the specified memory of the WebAssembly instance
as a immutable slice.
WebAssembly will soon support multiple linear memories, so this
forces the user to specify.
fn read_memory(ctx: &Ctx) -> u8 {
let first_memory = ctx.memory(0);
first_memory[0]
}
This exposes the specified memory of the WebAssembly instance
as a mutable slice.
WebAssembly will soon support multiple linear memories, so this
forces the user to specify.
extern fn host_func(ctx: &mut Ctx) {
let first_memory = ctx.memory_mut(0);
first_memory[0] = 42;
}
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static