Skip to content

Commit

Permalink
Disable the os_pipe impls on WASI for now.
Browse files Browse the repository at this point in the history
WASI doesn't yet support pipes, so os_pipe doesn't currently compile
under WASI, so disable the io-lifetimes impls for os_pipe on WASI for
now.
  • Loading branch information
sunfishcode committed Feb 5, 2022
1 parent ffc0e79 commit 8425682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ exclude = ["/.github"]
async-std = { version = "1.9.0", features = ["unstable"], optional = true }
# Optionally depend on tokio to implement traits for its types for now.
tokio = { version = "1.6.0", features = ["io-std", "fs", "net", "process"], optional = true }
# Optionally depend on os_pipe to implement traits for its types for now.
os_pipe = { version = "1.0.0", optional = true }
# Optionally depend on socket2 to implement traits for its types for now.
socket2 = { version = "0.4.0", optional = true }
# Optionally depend on mio to implement traits for its types for now.
mio = { version = "0.8.0", features = ["net", "os-ext"], optional = true }
# Optionally depend on fs_err to implement traits for its types for now.
fs-err = { version = "2.6.0", optional = true }

[target.'cfg(not(target_os = "wasi"))'.dependencies]
# Optionally depend on os_pipe to implement traits for its types for now.
os_pipe = { version = "1.0.0", optional = true }

[target.'cfg(not(windows))'.dependencies]
libc = { version = "0.2.96", optional = true }

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ mod impls_fs_err;
#[cfg(not(io_lifetimes_use_std))]
#[cfg(feature = "mio")]
mod impls_mio;
#[cfg(not(target_os = "wasi"))]
#[cfg(not(io_lifetimes_use_std))]
#[cfg(feature = "os_pipe")]
mod impls_os_pipe;
Expand Down

0 comments on commit 8425682

Please sign in to comment.