We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49d168a commit 64bfcb6Copy full SHA for 64bfcb6
examples/hermit-wasm/src/main.rs
@@ -44,10 +44,15 @@ pub fn main() -> Result<()> {
44
// Currently, we are using the default configuration.
45
let config = wasmtime::Config::new();
46
47
- info!("Start Hermit-WASM!");
+ if CONFIG.module_and_args.is_empty() {
48
+ eprintln!("No WebAssembly module specified. Please provide a .wacdsm file to run.");
49
+ std::process::exit(1);
50
+ }
51
+ let fname = CONFIG.module_and_args[0].clone();
52
+ info!("Start Hermit-WASM: {fname:?}");
53
54
let mut buffer = Vec::new();
- let mut f = File::open(CONFIG.module_and_args[0].clone()).expect("Unable to open wasm module");
55
+ let mut f = File::open(fname).expect("Unable to open wasm module");
56
57
f.read_to_end(&mut buffer)?;
58
0 commit comments