/src/wasmtime/crates/wasi/src/p2/host/env.rs
Line | Count | Source |
1 | | use crate::cli::WasiCliCtxView; |
2 | | use crate::p2::bindings::cli::environment; |
3 | | |
4 | | impl environment::Host for WasiCliCtxView<'_> { |
5 | 1.09k | fn get_environment(&mut self) -> wasmtime::Result<Vec<(String, String)>> { |
6 | 1.09k | Ok(self.ctx.environment.clone()) |
7 | 1.09k | } |
8 | 0 | fn get_arguments(&mut self) -> wasmtime::Result<Vec<String>> { |
9 | 0 | Ok(self.ctx.arguments.clone()) |
10 | 0 | } |
11 | 0 | fn initial_cwd(&mut self) -> wasmtime::Result<Option<String>> { |
12 | 0 | Ok(self.ctx.initial_cwd.clone()) |
13 | 0 | } |
14 | | } |