wasmtime_wasi/host/env.rs
use crate::bindings::cli::environment;
use crate::{WasiImpl, WasiView};
impl<T> environment::Host for WasiImpl<T>
where
T: WasiView,
{
fn get_environment(&mut self) -> anyhow::Result<Vec<(String, String)>> {
Ok(self.ctx().env.clone())
}
fn get_arguments(&mut self) -> anyhow::Result<Vec<String>> {
Ok(self.ctx().args.clone())
}
fn initial_cwd(&mut self) -> anyhow::Result<Option<String>> {
// FIXME: expose cwd in builder and save in ctx
Ok(None)
}
}