diff --git a/ableos/src/scratchpad.rs b/ableos/src/scratchpad.rs index 225ef4a3..be889576 100644 --- a/ableos/src/scratchpad.rs +++ b/ableos/src/scratchpad.rs @@ -238,7 +238,7 @@ pub fn command_parser(user: String, command: String) { let args = iter.collect::>(); println!("{:?}", args); if in_home || in_shared || in_system { - run_program(binary_prog); + run_program(&binary_prog); } else { println!("No such binary: {}", bin_name); error!("No such binary: {}", bin_name); diff --git a/ableos/src/wasm_jumploader/mod.rs b/ableos/src/wasm_jumploader/mod.rs index c4f6fc88..fc208e88 100644 --- a/ableos/src/wasm_jumploader/mod.rs +++ b/ableos/src/wasm_jumploader/mod.rs @@ -100,9 +100,9 @@ pub fn interp() { } } -pub fn run_program(program: Vec) { +pub fn run_program(program: &[u8]) { // Load wasm binary and prepare it for instantiation. - let module = wasmi::Module::from_buffer(&program).expect("failed to load wasm"); + let module = wasmi::Module::from_buffer(program).expect("failed to load wasm"); trace!("Loaded wasm binary"); let imports = ImportsBuilder::new().with_resolver("env", &host_functions::HostExternals {});