Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi/src/p2/host/env.rs
3069 views
1
use crate::cli::WasiCliCtxView;
2
use crate::p2::bindings::cli::environment;
3
4
impl environment::Host for WasiCliCtxView<'_> {
5
fn get_environment(&mut self) -> wasmtime::Result<Vec<(String, String)>> {
6
Ok(self.ctx.environment.clone())
7
}
8
fn get_arguments(&mut self) -> wasmtime::Result<Vec<String>> {
9
Ok(self.ctx.arguments.clone())
10
}
11
fn initial_cwd(&mut self) -> wasmtime::Result<Option<String>> {
12
Ok(self.ctx.initial_cwd.clone())
13
}
14
}
15
16