Skip to content
Open
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
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion libp2p/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 0.57.0

- Make the `dns` feature available on `wasm32` targets, where `libp2p-dns` resolves names over
DNS-over-HTTPS. Previously `libp2p-dns` was a non-`wasm32` dependency only.
See [PR XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX)
- Remove `wasm-bindgen` feature and make `wasm` support implicit.
See [PR 6102](https://github.com/libp2p/rust-libp2p/pull/6102)
- Raise MSRV to 1.88.0.
Expand Down
2 changes: 1 addition & 1 deletion libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ libp2p-autonat = { workspace = true, optional = true }
libp2p-connection-limits = { workspace = true }
libp2p-core = { workspace = true }
libp2p-dcutr = { workspace = true, optional = true }
libp2p-dns = { workspace = true, optional = true }
libp2p-floodsub = { workspace = true, optional = true }
libp2p-gossipsub = { workspace = true, optional = true }
libp2p-identify = { workspace = true, optional = true }
Expand All @@ -124,7 +125,6 @@ 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 }
libp2p-memory-connection-limits = { workspace = true, optional = true }
libp2p-quic = { workspace = true, optional = true }
Expand Down
1 change: 0 additions & 1 deletion libp2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub use libp2p_core::multihash;
pub use libp2p_dcutr as dcutr;
#[cfg(feature = "dns")]
#[cfg_attr(docsrs, doc(cfg(feature = "dns")))]
#[cfg(not(target_arch = "wasm32"))]
#[doc(inline)]
pub use libp2p_dns as dns;
#[cfg(feature = "floodsub")]
Expand Down
8 changes: 8 additions & 0 deletions transports/dns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## 0.45.0

- Support DNS transport for wasm32 targets that resolves DNS components over DNS-over-HTTPS (DoH).
`/dnsaddr` is always resolved, however `/dns`, `/dns4` and `/dns6` are governed by the
`DnsResolution` policy (default to `DnsResolutionAuto`) where addresses containing a explicit protocols
(i.e. `webrtc-direct`) are resolved to `/ip4`/`/ip6`, while the rest are passed through to the inner
transport unchanged, since browsers resolve those hostnames natively and need
the hostname preserved for SNI.
See [PR XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX).

- Update `hickory` dependencies to `v0.26`.
See [PR 6423](https://github.com/libp2p/rust-libp2p/pull/6423)
`ResolveError` now aliases hickory's `NetError`,
Expand Down
23 changes: 20 additions & 3 deletions transports/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
futures = { workspace = true }
libp2p-core = { workspace = true }
libp2p-identity = { workspace = true }
parking_lot = "0.12.5"
hickory-resolver = { workspace = true, features = ["system-config"] }
smallvec = "1.15.1"
tracing = { workspace = true }

[dev-dependencies]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
hickory-resolver = { workspace = true, features = ["system-config"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { workspace = true }
js-sys = "0.3.77"
send_wrapper = { version = "0.6.0", features = ["futures"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
thiserror = { workspace = true }
url = "2.5.4"
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = { workspace = true }
web-sys = { version = "0.3.77", features = ["AbortSignal", "Headers", "Request", "RequestInit", "Response", "Window", "WorkerGlobalScope"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.50"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
libp2p-identity = { workspace = true, features = ["rand"] }
tokio = { workspace = true, features = ["rt", "time"] }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
Expand All @@ -31,6 +47,7 @@ tokio = ["hickory-resolver/tokio"]
# More information: https://docs.rs/about/builds#cross-compiling
[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]

[lints]
workspace = true
Loading