Stream: git-wasmtime

Topic: wasmtime / issue #1772 WasiCtx and preopen


view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 07:37):

alexandruradovici commented on issue #1772:

Same problem here, any ideas?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 30 2024 at 08:04):

alexandruradovici commented on issue #1772:

It turns out that using

let (command, _instance) = wasmtime_wasi::bindings::sync::Command::instantiate(
        &mut store,
        &component,
        &mut linker,
    ).unwrap();

to instantiate the component make preopened_dir to work, but using

let example_res = Root::instantiate(&mut store, &component, &linker);
    match example_res {
        Ok((instance, _)) => {
            instance.interface0.call_funcall(&mut store).unwrap();
        }
        Err(e) => println!("Error at calling function {:?}", e),
    }

fails.

We use a reactor component, so I think we are missing some wasi initialization step, we just cannot figure out which one.


Last updated: Nov 22 2024 at 16:03 UTC