wasmtime_wasi/host/env.rs
1use crate::bindings::cli::environment;
2use crate::{WasiImpl, WasiView};
3
4impl<T> environment::Host for WasiImpl<T>
5where
6 T: WasiView,
7{
8 fn get_environment(&mut self) -> anyhow::Result<Vec<(String, String)>> {
9 Ok(self.ctx().env.clone())
10 }
11 fn get_arguments(&mut self) -> anyhow::Result<Vec<String>> {
12 Ok(self.ctx().args.clone())
13 }
14 fn initial_cwd(&mut self) -> anyhow::Result<Option<String>> {
15 // FIXME: expose cwd in builder and save in ctx
16 Ok(None)
17 }
18}