From 7026c6c484c51ae66c094c145c4cc873c97ea438 Mon Sep 17 00:00:00 2001 From: Brooks J Rady Date: Wed, 25 Nov 2020 20:35:26 +0000 Subject: [PATCH] Don't crash (sometimes) --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 2c152198..a7cac65f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -293,6 +293,8 @@ pub fn start(mut os_input: Box, opts: Opt) { "host_open_file", Function::new_native_with_env(&store, Arc::clone(&wasi_env.state), host_open_file), ); */ + fn noop() {} + host_exports.insert("host_open_file", Function::new_native(&store, noop)); import_object.register("mosaic", host_exports); let instance = Instance::new(&module, &import_object)?;