Skip to content

Commit

Permalink
fix(pkarr): wasm dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Sep 22, 2024
1 parent fddf29a commit 60fb3a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 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 pkarr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ tracing = "0.1.40"
dyn-clone = "1.0.17"
lru = { version = "0.12.3", default-features = false }
serde = { version = "1.0.209", features = ["derive"], optional = true }
reqwest = { version = "0.12.7", features = ["rustls-tls"], optional = true }

document-features = "0.2.8"

Expand All @@ -29,10 +28,13 @@ mainline = { version = "2.0.1", optional = true }
flume = { version = "0.11.0", features = ["select", "eventual-fairness", "async"], default-features = false , optional = true }
tokio = { version = "1.40.0", optional = true }
rand = { version = "0.8.5", optional = true }
reqwest = { version = "0.12.7", features = ["rustls-tls"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.69"
futures = "0.3.30"
getrandom = { version = "0.2", features = ["js"] }
reqwest = "0.12.7"

[dev-dependencies]
postcard = { version = "1.0.10", features = ["alloc"] }
Expand Down
4 changes: 2 additions & 2 deletions pkarr/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ pub enum Error {
NotMostRecent,

// === Relay errors ===
#[cfg(feature = "relay")]
#[cfg(any(feature = "relay", target_arch = "wasm32"))]
#[error(transparent)]
/// Transparent [reqwest::Error]
RelayError(#[from] reqwest::Error),

#[cfg(feature = "relay")]
#[cfg(any(feature = "relay", target_arch = "wasm32"))]
#[error("Empty list of relays")]
/// Empty list of relays
EmptyListOfRelays,
Expand Down

0 comments on commit 60fb3a1

Please sign in to comment.