We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasmer -vV; rustc -vV zsh: command not found: wasmer rustc 1.84.0-nightly (9b18a122f 2024-10-26) binary: rustc commit-hash: 9b18a122f769859dc00d7b2c73b03dc6a1152983 commit-date: 2024-10-26 host: x86_64-unknown-linux-gnu release: 1.84.0-nightly LLVM version: 19.1.1
Calling preopen_dir with the current PWD causes an error:
Caused by: wasi filesystem creation error: Could not get metadata for file "/home/<snip>": entry not found
Could not get metadata for file "/home/<snip>": entry not found
Calling code:
use std::env; use wasmer::{Module, Store}; use wasmer_wasix::WasiEnv; fn main() -> anyhow::Result<()> { let mut store = Store::default(); let module = include_bytes!("../module.wasm"); let module = Module::new(&store, &module)?; let current_dir = env::current_dir()?; WasiEnv::builder("wat") .preopen_dir(current_dir)? .run_with_store(module, &mut store)?; Ok(()) }
Runtime dependencies:
[dependencies] anyhow = "1.0.90" wasmer = { version = "5.0.0-rc.1", features = ["cranelift"] } wasmer-wasix = "0.29.0"
module.wasm:
fn main() { println!("Writing some bytes"); let bytes: Vec<u8> = vec![0x60, 0x60, 0x60]; let file = std::fs::File::create("test.bin").unwrap(); std::io::Write::write_all(&mut std::io::BufWriter::new(file), &bytes).unwrap(); }
Module dependencies: none
Module is compiled with cargo build --target wasm32-wasip1 --release Code is run with cargo run --release
cargo build --target wasm32-wasip1 --release
cargo run --release
Filesystem mount that the wasm module can access
An error
The text was updated successfully, but these errors were encountered:
maminrayej
No branches or pull requests
Describe the bug
Calling preopen_dir with the current PWD causes an error:
Caused by:
wasi filesystem creation error:
Could not get metadata for file "/home/<snip>": entry not found
Steps to reproduce
Calling code:
Runtime dependencies:
module.wasm:
Module dependencies: none
Module is compiled with
cargo build --target wasm32-wasip1 --release
Code is run with
cargo run --release
Expected behavior
Filesystem mount that the wasm module can access
Actual behavior
An error
Additional context
The text was updated successfully, but these errors were encountered: