diff options
| author | Henry <mail@henrygressmann.de> | 2026-04-12 21:16:49 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-04-12 21:16:49 +0200 |
| commit | 80cf746b50513af77203f382f5f53bd036087358 (patch) | |
| tree | a9493ec0a69caba0dd82e568b6556340be306e0a /examples/rust/src/tinywasm.rs | |
| parent | d89729df921d39f81fe8a43990678853deb1edde (diff) | |
feat: remove lifetimes from runtime objects
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'examples/rust/src/tinywasm.rs')
| -rw-r--r-- | examples/rust/src/tinywasm.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rust/src/tinywasm.rs b/examples/rust/src/tinywasm.rs index e06cf81..7de0dbc 100644 --- a/examples/rust/src/tinywasm.rs +++ b/examples/rust/src/tinywasm.rs @@ -1,5 +1,5 @@ #![no_main] -use tinywasm::{Extern, FuncContext}; +use tinywasm::{FuncContext, HostFunction}; #[link(wasm_import_module = "env")] unsafe extern "C" { @@ -19,7 +19,7 @@ fn run() -> tinywasm::Result<()> { imports.define( "env", "printi32", - Extern::typed_func(|_: FuncContext<'_>, v: i32| { + HostFunction::from(&mut store, |_: FuncContext<'_>, v: i32| { unsafe { printi32(v) } Ok(()) }), |
