Skip to content

Commit 7acfe39

Browse files
authored
feat(iroh): Enable netwatch::netmon::Monitor and the metrics feature in Wasm (#3206)
## Description - Enables the `netwatch` dependency in Wasm - Un-cfg-s the `netwatch::netmon::Monitor` in `magicsock::Actor` - Enables the `metrics` feature for Wasm by depending on a newer iroh-metrics - Minor: We go back to using `netwatch::ip::is_unicast_link_local`, as we can depend on that in Wasm again now. ## Notes & open questions There's some dependencies: - [x] Needs #3203 to be merged first - [x] Depends on n0-computer/net-tools#14 being merged - [x] And released - [x] Depends on a new release of the `iroh-metrics` main branch (I.e. n0-computer/iroh-metrics#11 being released) Closes #3195 ## Change checklist - [x] Self-review.
1 parent aa7463b commit 7acfe39

File tree

9 files changed

+219
-68
lines changed

9 files changed

+219
-68
lines changed

.cargo/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[target.wasm32-unknown-unknown]
22
runner = "wasm-bindgen-test-runner"
3+
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']

Cargo.lock

+181-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-dns-server/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ governor = "0.6.3" #needs new release of tower_governor for 0.7.0
2828
hickory-server = { version = "=0.25.0-alpha.5", features = ["dns-over-rustls", "dns-over-https-rustls"] }
2929
http = "1.0.0"
3030
humantime-serde = "1.1.1"
31-
iroh-metrics = { version = "0.31.0" }
31+
iroh-metrics = { version = "0.32.0", features = ["metrics", "service"] }
3232
lru = "0.12.3"
3333
n0-future = "0.1.2"
3434
pkarr = { version = "2.3.1", features = [ "async", "relay", "dht"], default-features = false }

iroh-net-report/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ anyhow = "1"
2525
bytes = "1.7"
2626
derive_more = { version = "1.0.0", features = ["display"] }
2727
iroh-base = { version = "0.33.0", path = "../iroh-base", default-features = false, features = ["relay"] }
28-
iroh-metrics = { version = "0.31", default-features = false }
28+
iroh-metrics = { version = "0.32", default-features = false }
2929
iroh-relay = { version = "0.33", default-features = false, path = "../iroh-relay" }
3030
n0-future = "0.1.2"
3131
quinn = { package = "iroh-quinn", version = "0.13.0", default-features = false }
@@ -41,8 +41,8 @@ url = { version = "2.4" }
4141
# non-wasm-in-browser dependencies
4242
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
4343
hickory-resolver = "=0.25.0-alpha.5"
44-
netwatch = { version = "0.3" }
45-
portmapper = { version = "0.3", default-features = false }
44+
netwatch = { version = "0.4" }
45+
portmapper = { version = "0.4", default-features = false }
4646
surge-ping = "0.8.0"
4747

4848
[dev-dependencies]

0 commit comments

Comments
 (0)