From 32d6f1e4fd7e88831ccdefdd7a5559093f0d3fa6 Mon Sep 17 00:00:00 2001 From: Able Date: Sun, 14 Nov 2021 22:58:13 -0600 Subject: [PATCH] commit p2 --- src/main.rs | 24 +++++++++++------------- wasm/ableos-wasm-test.wasm | Bin 0 -> 173 bytes 2 files changed, 11 insertions(+), 13 deletions(-) create mode 100755 wasm/ableos-wasm-test.wasm diff --git a/src/main.rs b/src/main.rs index c5e1f70..779b5c4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,8 +7,6 @@ use wasmi::{ mod wasm_sys; use wasm_sys::SysCall; -pub const KILL: usize = 0; - struct HostFunctions; impl HostFunctions { fn check_signature(&self, index: usize, signature: &Signature) -> bool { @@ -76,17 +74,17 @@ fn main() { // Parse WAT (WebAssembly Text format) into wasm bytecode. // let wasm_binary = wabt::wat2wasm(include_str!("../wasm/test.wat")); let wasm_binary = //wabt::wat2wasm( - include_bytes!("../src/ableos-wasm-test.wasm"); //.unwrap(); - // ); - /* - let wasm_binary = match wasm_binary { - Ok(abc) => abc, - Err(abc) => { - println!("{}", abc); - return; - } - }; - */ + include_bytes!("../wasm/ableos-wasm-test.wasm"); //.unwrap(); + // ); + /* + let wasm_binary = match wasm_binary { + Ok(abc) => abc, + Err(abc) => { + println!("{}", abc); + return; + } + }; + */ // .expect("failed to parse wat"); // Load wasm binary and prepare it for instantiation. diff --git a/wasm/ableos-wasm-test.wasm b/wasm/ableos-wasm-test.wasm new file mode 100755 index 0000000000000000000000000000000000000000..808cd28db7792acbc24510768fa549229c8b7cce GIT binary patch literal 173 zcmY+7O%8%E5JtagD)P85u!gX*ggV>WnU2fygrD*6eDAWLp&uUx8Ba;Z1S*&tNx~W%OP=|vGVoa@ nwWg?Oje2R((%x@G3odMvMniv literal 0 HcmV?d00001