feat: update example4
This commit is contained in:
@@ -4,7 +4,7 @@ use wasmtime::*;
|
||||
fn main() -> Result<()> {
|
||||
// Modules can be compiled through either the text or binary format
|
||||
let engine = Engine::default();
|
||||
let wasm = include_bytes!("/Users/hatterjiang/Code/hattergit/simple-rust-tests/__wasm/wasmtime/wasms/simple_rust_wasm/target/wasm32-unknown-unknown/debug/simple_rust_wasm.wasm");
|
||||
let wasm = include_bytes!("../wasms/simple_rust_wasm/target/wasm32-unknown-unknown/debug/simple_rust_wasm.wasm");
|
||||
let module = Module::new(&engine, wasm)?;
|
||||
|
||||
// Create a `Linker` which will be later used to instantiate this module.
|
||||
|
||||
@@ -17,6 +17,4 @@ run_example3:
|
||||
|
||||
run_example4:
|
||||
cd wasms/simple_rust_wasm; cargo build --target wasm32-unknown-unknown
|
||||
cp wasms/simple_rust_wasm/target/wasm32-unknown-unknown/debug/simple_rust_wasm.wasm .
|
||||
cargo run --example example4
|
||||
rm simple_rust_wasm.wasm
|
||||
Reference in New Issue
Block a user