Skip to content

Commit

Permalink
Move the libp2p dependency to a fork
Browse files Browse the repository at this point in the history
Move the `libp2p` dependency to a fork to enable compilation for
`wasm` and non-`wasm` targets.
This is due to the fact that the `gossipsub` protocol got the `wasm`
support dropped in this
[PR](libp2p/rust-libp2p#2506).
  • Loading branch information
jsdanielh committed Jan 26, 2023
1 parent b274d88 commit d9b953c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 52 deletions.
76 changes: 28 additions & 48 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion beserial/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ maintenance = { status = "experimental" }
arrayvec = "0.7.2"
beserial_derive = { path = "beserial_derive", version = "0.1.0", optional = true }
bitvec = { version = "1.0", optional = true }
libp2p = { version = "0.50", default-features = false, optional = true }
libp2p = { git = "https://github.com/jsdanielh/rust-libp2p.git", default-features = false, optional = true }
byteorder = "1.2"
thiserror = "1.0"
num-traits = "0.2"
Expand Down
4 changes: 2 additions & 2 deletions network-libp2p/Cargo.toml
Expand Up @@ -53,7 +53,7 @@ nimiq-utils = { path = "../utils", features = [
nimiq-validator-network = { path = "../validator-network" }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
libp2p = { version = "0.50", default-features = false, features = [
libp2p = { git = "https://github.com/jsdanielh/rust-libp2p.git", default-features = false, features = [
"gossipsub",
"identify",
"kad",
Expand All @@ -65,7 +65,7 @@ libp2p = { version = "0.50", default-features = false, features = [
] }

[target.'cfg(target_family = "wasm")'.dependencies]
libp2p = { version = "0.50", default-features = false, features = [
libp2p = { git = "https://github.com/jsdanielh/rust-libp2p.git", default-features = false, features = [
"gossipsub",
"identify",
"kad",
Expand Down
2 changes: 1 addition & 1 deletion utils/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ maintenance = { status = "experimental" }
clear_on_drop = { version = "0.2", optional = true }
futures = { package = "futures-util", version = "0.3" }
hex = { version = "0.4", optional = true }
libp2p = { version = "0.50", default-features = false, optional = true }
libp2p = { git = "https://github.com/jsdanielh/rust-libp2p.git", default-features = false, optional = true }
log = { package = "tracing", version = "0.1", optional = true, features = ["log"] }
parking_lot = { git = "https://github.com/styppo/parking_lot.git" }
rand = { version = "0.8", optional = true }
Expand Down

0 comments on commit d9b953c

Please sign in to comment.