Skip to content

Commit

Permalink
Implement proc_spawn using wasix crate
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bartoszek authored and Arshia001 committed Jun 17, 2024
1 parent 281a460 commit cb80761
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 148 deletions.
4 changes: 2 additions & 2 deletions library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ hermit-abi = { version = "0.3.2", features = ['rustc-dep-of-std'], public = true
wasi = { version = "0.11.0", features = ['rustc-dep-of-std'], default-features = false }

[target.wasm32-wasmer-wasi.dependencies]
wasi = { package = "wasix", version = "0.12.9", features = ['rustc-dep-of-std'], default-features = false }
wasi = { package = "wasix", version = "0.12.9", features = ['rustc-dep-of-std'], default-features = false, public = true }

[target.wasm64-wasmer-wasi.dependencies]
wasi = { package = "wasix", version = "0.12.9", features = ['rustc-dep-of-std'], default-features = false }
wasi = { package = "wasix", version = "0.12.9", features = ['rustc-dep-of-std'], default-features = false, public = true }

[features]
backtrace = [
Expand Down
15 changes: 15 additions & 0 deletions library/std/src/sys/unix/process/process_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,21 @@ impl Command {
self.stderr = Some(stderr);
}

#[allow(dead_code)]
pub fn get_stdin(&self) -> Option<&Stdio> {
self.stdin.as_ref()
}

#[allow(dead_code)]
pub fn get_stdout(&self) -> Option<&Stdio> {
self.stdout.as_ref()
}

#[allow(dead_code)]
pub fn get_stderr(&self) -> Option<&Stdio> {
self.stderr.as_ref()
}

pub fn env_mut(&mut self) -> &mut CommandEnv {
&mut self.env
}
Expand Down
Loading

0 comments on commit cb80761

Please sign in to comment.