Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ default = [
docs = ["attributes", "unstable", "default"]
unstable = [
"std",
"async-io"
"async-io",
"async-process",
]
attributes = ["async-attributes"]
std = [
Expand Down Expand Up @@ -83,6 +84,7 @@ async-global-executor = { version = "1.4.0", optional = true, features = ["async
async-io = { version = "1.0.1", optional = true }
blocking = { version = "1.0.0", optional = true }
futures-lite = { version = "1.0.0", optional = true }
async-process = { version = "1.0.1", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
gloo-timers = { version = "0.2.1", features = ["futures"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ cfg_default! {

cfg_unstable! {
pub mod pin;
#[cfg(not(target_os = "unknown"))]
#[cfg(all(not(target_os = "unknown"), feature = "std"))]
pub mod process;

mod unit;
Expand Down
5 changes: 5 additions & 0 deletions src/os/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ cfg_default! {
pub mod fs;
pub mod net;
}

#[cfg(all(feature = "unstable", feature = "std"))]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::unix as process;
3 changes: 3 additions & 0 deletions src/os/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ cfg_std! {
cfg_unstable! {
#[cfg(feature = "default")]
pub mod fs;
#[cfg(feature = "std")]
#[cfg(windows)]
pub use async_process::windows as process;
}
40 changes: 40 additions & 0 deletions src/process.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//! A module for working with processes.
//!
//! This module is mostly concerned with spawning and interacting with child processes, but it also
//! provides abort and exit for terminating the current process.
//!
//! This is an async version of [`std::process`].
//!
//! [`std::process`]: https://doc.rust-lang.org/std/process/index.html

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::ExitStatus;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::Output;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::Stdio;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::Child;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::ChildStderr;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::ChildStdin;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::ChildStdout;

#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use async_process::Command;
14 changes: 0 additions & 14 deletions src/process/mod.rs

This file was deleted.