You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks that preopen directories are not available in Wasm Reactors (i.e. when compiling crate as cdylib). Presumably, because __wasm_call_ctors and therefore __wasilibc_populate_preopens are not called.
It's also possible that I'm creating Wasm Reactors the wrong way, but I couldn't find any documentation, and this way seems to work fine, other than this particular issue.
It looks that preopen directories are not available in Wasm Reactors (i.e. when compiling crate as
cdylib
). Presumably, because__wasm_call_ctors
and therefore__wasilibc_populate_preopens
are not called.It's also possible that I'm creating Wasm Reactors the wrong way, but I couldn't find any documentation, and this way seems to work fine, other than this particular issue.
cat Cargo.toml
Wasm Command:
cat src/main.rs
rm -rf target/; cargo build --release --target wasm32-wasi --bin preopen
wasm-objdump -x target/wasm32-wasi/release/*.wasm | awk '/Import/{p=1} /Function/{p=0} p' | cut -d"<" -f3-
wasmtime --dir=/etc target/wasm32-wasi/release/preopen.wasm
Wasm Reactor:
cat src/lib.rs
rm -rf target/; cargo build --release --target wasm32-wasi --lib
wasm-objdump -x target/wasm32-wasi/release/*.wasm | awk '/Import/{p=1} /Function/{p=0} p' | cut -d"<" -f3-
(notice missing
wasi_snapshot_preview1.fd_prestat_get
andwasi_snapshot_preview1.fd_prestat_dir_name
imports)wasmtime --dir=/etc target/wasm32-wasi/release/preopen.wasm
rustc --version --verbose
The text was updated successfully, but these errors were encountered: