From 8425682696d60c62a77c4ef92816d017f9c39c96 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 2 Feb 2022 16:19:01 -0800 Subject: [PATCH] Disable the `os_pipe` impls on WASI for now. 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. --- Cargo.toml | 6 ++++-- src/lib.rs | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 16c8060..5a53c8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,6 @@ 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. @@ -32,6 +30,10 @@ 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 } diff --git a/src/lib.rs b/src/lib.rs index 631c700..4783839 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;