From d514f80f643d73c9202051d98d5f354f3dac2dc7 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Wed, 18 Jan 2023 23:48:15 +0800 Subject: [PATCH] feat: update example4 --- __wasm/wasmtime/examples/example4.rs | 2 +- __wasm/wasmtime/justfile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/__wasm/wasmtime/examples/example4.rs b/__wasm/wasmtime/examples/example4.rs index 8cfb613..6f73d6d 100644 --- a/__wasm/wasmtime/examples/example4.rs +++ b/__wasm/wasmtime/examples/example4.rs @@ -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. diff --git a/__wasm/wasmtime/justfile b/__wasm/wasmtime/justfile index c37a50d..c3bf4a1 100644 --- a/__wasm/wasmtime/justfile +++ b/__wasm/wasmtime/justfile @@ -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 \ No newline at end of file