summaryrefslogtreecommitdiff
path: root/examples/rust/src/tinywasm_no_std.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rust/src/tinywasm_no_std.rs')
-rw-r--r--examples/rust/src/tinywasm_no_std.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rust/src/tinywasm_no_std.rs b/examples/rust/src/tinywasm_no_std.rs
index 9a032dd..5444280 100644
--- a/examples/rust/src/tinywasm_no_std.rs
+++ b/examples/rust/src/tinywasm_no_std.rs
@@ -1,7 +1,7 @@
#![no_main]
#![no_std]
use lol_alloc::{AssumeSingleThreaded, FreeListAllocator};
-use tinywasm::{Extern, FuncContext};
+use tinywasm::{FuncContext, HostFunction};
extern crate alloc;
@@ -36,7 +36,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(())
}),