Skip to content

Commit 987fb75

Browse files
committed
Some weird crap to get wasm build to work
1 parent 2e24f20 commit 987fb75

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[target.wasm32-unknown-unknown]
2+
runner = "wasm-bindgen-test-runner"
3+
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

irpc-iroh/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ postcard = { workspace = true, features = ["alloc", "use-std"] }
1919
n0-future = { workspace = true }
2020
irpc = { version = "0.2.0", path = ".." }
2121

22+
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
23+
getrandom = { version = "0.3", features = ["wasm_js"] }
24+
2225
[dev-dependencies]
2326
n0-future = { workspace = true }
2427
tracing-subscriber = { workspace = true, features = ["fmt"] }

0 commit comments

Comments
 (0)