Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(libp2p): arch gates *-websys export and dependencies. #5891

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
3 changes: 3 additions & 0 deletions libp2p/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- Introduce `libp2p-webrtc-websys` behind `webrtc-websys` feature flag.
See [PR 5819](https://github.com/libp2p/rust-libp2p/pull/5819).

- Make the `*-websys` variants (`libp2p-webrtc-websys`, `libp2p-websocket-websys`, `libp2p-webtransport-websys`) only available on wasm32 target architecture.
See [PR 5891](https://github.com/libp2p/rust-libp2p/pull/5891).

## 0.55.0

- Raise MSRV to 1.83.0.
Expand Down
9 changes: 5 additions & 4 deletions libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` featu
getrandom = { workspace = true } # Explicit dependency to be used in `wasm-bindgen` feature
# TODO feature flag?
rw-stream-sink = { workspace = true }

libp2p-allow-block-list = { workspace = true }
libp2p-autonat = { workspace = true, optional = true }
libp2p-connection-limits = { workspace = true }
Expand All @@ -119,14 +118,16 @@ libp2p-relay = { workspace = true, optional = true }
libp2p-rendezvous = { workspace = true, optional = true }
libp2p-request-response = { workspace = true, optional = true }
libp2p-swarm = { workspace = true }
libp2p-webrtc-websys = { workspace = true, optional = true }
libp2p-websocket-websys = { workspace = true, optional = true }
libp2p-webtransport-websys = { workspace = true, optional = true }
libp2p-yamux = { workspace = true, optional = true }
multiaddr = { workspace = true }
pin-project = "1.0.0"
thiserror = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
libp2p-webrtc-websys = { workspace = true, optional = true }
libp2p-websocket-websys = { workspace = true, optional = true }
libp2p-webtransport-websys = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
libp2p-dns = { workspace = true, optional = true }
libp2p-mdns = { workspace = true, optional = true }
Expand Down
6 changes: 3 additions & 3 deletions libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,17 @@ pub use libp2p_uds as uds;
#[cfg(not(target_arch = "wasm32"))]
#[doc(inline)]
pub use libp2p_upnp as upnp;
#[cfg(feature = "webrtc-websys")]
#[cfg(all(feature = "webrtc-websys", target_arch = "wasm32"))]
#[doc(inline)]
pub use libp2p_webrtc_websys as webrtc_websys;
#[cfg(feature = "websocket")]
#[cfg(not(target_arch = "wasm32"))]
#[doc(inline)]
pub use libp2p_websocket as websocket;
#[cfg(feature = "websocket-websys")]
#[cfg(all(feature = "websocket-websys", target_arch = "wasm32"))]
#[doc(inline)]
pub use libp2p_websocket_websys as websocket_websys;
#[cfg(feature = "webtransport-websys")]
#[cfg(all(feature = "webtransport-websys", target_arch = "wasm32"))]
#[cfg_attr(docsrs, doc(cfg(feature = "webtransport-websys")))]
#[doc(inline)]
pub use libp2p_webtransport_websys as webtransport_websys;
Expand Down
Loading