diff --git a/aos_wasm_stress_test/aos_wasm_stress_test.wasm b/aos_wasm_stress_test/aos_wasm_stress_test.wasm new file mode 100755 index 0000000..0f4de4c Binary files /dev/null and b/aos_wasm_stress_test/aos_wasm_stress_test.wasm differ diff --git a/aos_wasm_stress_test/build.sh b/aos_wasm_stress_test/build.sh index 986dc9e..9c1cbfc 100755 --- a/aos_wasm_stress_test/build.sh +++ b/aos_wasm_stress_test/build.sh @@ -1,3 +1,3 @@ -cargo build --release -wasm-strip target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm -mv target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm aos_wasm_stress_test.wasm \ No newline at end of file +cargo build --release --target wasm32-unknown-unknown +mv target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm aos_wasm_stress_test.wasm +wasm-strip aos_wasm_stress_test.wasm \ No newline at end of file diff --git a/aos_wasm_stress_test/src/main.rs b/aos_wasm_stress_test/src/main.rs index 639a082..6e3c624 100644 --- a/aos_wasm_stress_test/src/main.rs +++ b/aos_wasm_stress_test/src/main.rs @@ -6,11 +6,13 @@ use libwasm::{driver::DriverExitCode, get_input}; #[no_mangle] fn start() -> i32 { let rand; - let ret; + let mut ret; unsafe { send_signal(PID(1), Signals::Quit); rand = get_random(); - ret = get_input(); + loop { + ret = get_input(); + } } // rand as i32