Skip to content

Commit 72a7050

Browse files
committed
feat: disable tokio multithreaded runtime for wasm
1 parent 7e5584e commit 72a7050

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

libdd-common/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ regex = "1.5"
3838
reqwest = { version = "0.13", features = ["rustls"], default-features = false, optional = true }
3939
rustls-native-certs = { version = "0.8.1", optional = true }
4040
thiserror = "1.0"
41-
tokio = { version = "1.23", features = ["rt", "macros", "net", "io-util", "fs"] }
41+
tokio = { version = "1.23", features = ["rt", "macros", "io-util", "time", "sync"] }
4242
tokio-rustls = { version = "0.26", default-features = false, optional = true }
4343
serde = { version = "1.0", features = ["derive"] }
4444
static_assertions = "1.1.0"
4545
libc = "0.2"
4646
const_format = "0.2.34"
4747
nix = { version = "0.29", features = ["process"] }
48+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
49+
tokio = { version = "1.23", features = ["rt-multi-thread", "net", "fs"] }
50+
4851
[target.'cfg(windows)'.dependencies.windows-sys]
4952
version = "0.52"
5053
features = ["Win32_Foundation", "Win32_System_Performance"]

libdd-trace-utils/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rmp-serde = "1.1.1"
2828
tracing = { version = "0.1", default-features = false }
2929
serde_json = "1.0"
3030
futures = { version = "0.3", default-features = false }
31-
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
31+
tokio = { version = "1", features = ["macros"] }
3232
rand = "0.8.5"
3333
bytes = "1.6.0"
3434
rmpv = { version = "1.3.0", default-features = false }
@@ -54,6 +54,9 @@ httpmock = { version = "0.8.0-alpha.1", optional = true }
5454
urlencoding = { version = "2.1.3", optional = true }
5555
indexmap = "2.11"
5656

57+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
58+
tokio = { version = "1", features = ["rt-multi-thread"] }
59+
5760
[dev-dependencies]
5861
bolero = "0.13"
5962
criterion = "0.5.1"

0 commit comments

Comments
 (0)