Open
Description
Hello everybody. I'm a beginner in Rust and Wasm, so this doubt can be something very simple.
During the execution of my plugin, I'm trying to access a directory to search for a configuration, which is constantly being updated, but the code presents the following error message.
wasm log my-vm: cannot open config file: Custom { kind: Uncategorized, error: "failed to find a pre-opened file descriptor through which \"/etc/envoy/config.json\" could be opened" }
This is the snippet of my code that tries to access the file:
let result = File::open("/etc/envoy/config.json");
match result {
Ok(f) => {
let reader = BufReader::new(f);
let config: Config = serde_json::from_reader(reader).unwrap();
},
Err(status) => {
error!("cannot open config file: {:?}", status)
}
}
and this is the command I'm using to generate wasm:
cargo build --target wasm32-wasi --release
is this a possible operation today in proxy-wasm? If so, would anyone know how to help me?
Tks.
Metadata
Metadata
Assignees
Labels
No labels