Skip to content

Commit 6793601

Browse files
committed
Remove 2nd Tokio Runtime in Auto Splitting Runtime
Wasmtime's WASI implementation nowadays internally has its own Tokio runtime. You can only ever run a single Tokio runtime on a thread at the same time. Wasmtime provides async support, so this likely would have also solved the issue. However, this probably would've made it harder to use the runtime in other situations. So instead we just remove our own runtime, which was not really necessary anyway.
1 parent fff8df0 commit 6793601

File tree

3 files changed

+180
-118
lines changed

3 files changed

+180
-118
lines changed

Cargo.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ splits-io-api = { version = "0.4.0", optional = true }
9191

9292
# Auto Splitting
9393
livesplit-auto-splitting = { path = "crates/livesplit-auto-splitting", version = "0.1.0", optional = true }
94-
tokio = { version = "1.24.2", default-features = false, features = [
95-
"rt",
96-
"sync",
97-
"time",
98-
], optional = true }
94+
arc-swap = { version = "1.7.1", optional = true }
9995
log = { version = "0.4.14", default-features = false, optional = true }
10096

10197
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
@@ -191,7 +187,7 @@ wasm-web = [
191187
"web-sys",
192188
]
193189
networking = ["std", "splits-io-api"]
194-
auto-splitting = ["std", "livesplit-auto-splitting", "tokio", "log"]
190+
auto-splitting = ["std", "livesplit-auto-splitting", "arc-swap", "log"]
195191

196192
[lib]
197193
bench = false

crates/livesplit-auto-splitting/src/runtime/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,16 @@ fn single_process() -> ProcessRefreshKind {
190190
#[non_exhaustive]
191191
pub struct Config {
192192
/// This enables debug information for the WebAssembly module. This is
193-
/// useful for debugging purposes. By default this `true` if the feature
193+
/// useful for debugging purposes. By default this is `true` if the feature
194194
/// `debugger-support` is enabled.
195195
pub debug_info: bool,
196196
/// This enables optimizations for the WebAssembly module. This is enabled
197197
/// by default. You may want to disable this when debugging the auto
198198
/// splitter.
199199
pub optimize: bool,
200200
/// This enables backtrace details for the WebAssembly module. If a trap
201-
/// occurs more details are printed in the backtrace. By default this `true`
202-
/// if the feature `enhanced-backtrace` is enabled.
201+
/// occurs more details are printed in the backtrace. By default this is
202+
/// `true` if the feature `enhanced-backtrace` is enabled.
203203
pub backtrace_details: bool,
204204
}
205205

0 commit comments

Comments
 (0)