diff --git a/Cargo.toml b/Cargo.toml index 403de627..b148540e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,7 +108,6 @@ libp2p-relay = { version = "0.15.0", path = "protocols/relay", optional = true } libp2p-rendezvous = { version = "0.12.0", path = "protocols/rendezvous", optional = true } libp2p-request-response = { version = "0.24.0", path = "protocols/request-response", optional = true } libp2p-swarm = { version = "0.42.0", path = "swarm" } -libp2p-uds = { version = "0.38.0", path = "transports/uds", optional = true } libp2p-wasm-ext = { version = "0.39.0", path = "transports/wasm-ext", optional = true } libp2p-yamux = { version = "0.43.0", path = "muxers/yamux", optional = true } multiaddr = { version = "0.17.0" } @@ -121,6 +120,7 @@ libp2p-mdns = { version = "0.43.0", path = "protocols/mdns", optional = true } libp2p-quic = { version = "=0.7.0-alpha.2", path = "transports/quic", optional = true } libp2p-tcp = { version = "0.39.0", path = "transports/tcp", optional = true } libp2p-tls = { version = "=0.1.0-alpha.2", path = "transports/tls", optional = true } +libp2p-uds = { version = "0.38.0", path = "transports/uds", optional = true } libp2p-webrtc = { version = "=0.4.0-alpha.2", path = "transports/webrtc", optional = true } libp2p-websocket = { version = "0.41.0", path = "transports/websocket", optional = true } diff --git a/src/lib.rs b/src/lib.rs index e87a5f74..61f525e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,6 +119,8 @@ pub use libp2p_tcp as tcp; #[doc(inline)] pub use libp2p_tls as tls; #[cfg(feature = "uds")] +#[cfg_attr(docsrs, doc(cfg(feature = "uds")))] +#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))] #[doc(inline)] pub use libp2p_uds as uds; #[cfg(feature = "wasm-ext")] diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 32948c6d..8995bd0b 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -10,14 +10,14 @@ repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] -[target.'cfg(all(unix, not(target_os = "emscripten")))'.dependencies] +[dependencies] async-std = { version = "1.6.2", optional = true } libp2p-core = { version = "0.39.0", path = "../../core" } log = "0.4.1" futures = "0.3.26" tokio = { version = "1.15", default-features = false, features = ["net"], optional = true } -[target.'cfg(all(unix, not(target_os = "emscripten")))'.dev-dependencies] +[dev-dependencies] tempfile = "3.4" # Passing arguments to the docsrs builder in order to properly document cfg's.