Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 5e7d4b2

Browse files
committed
combine fiber abstractions from async_.rs and concurrent.rs
A long time ago, when I first started implementing CM async, I cut-and-pasted `async_.rs`'s `FiberFuture` and heavily modified it. Both have evolved separately since then, and now that the CM async work has generally stabilized it's time to unify them. This creates a new `runtime::fiber` submodule which `async_.rs` and `concurrent.rs` share. The central type is `StoreFiber`, which is a more versatile version of `FiberFuture`, supporting fibers which can either retain exclusive access to the store across suspend points or release it, allowing the store to be used by the root event loop and/or other fibers to run before the original fiber resumes. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent 336c85c commit 5e7d4b2

16 files changed

Lines changed: 822 additions & 1352 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ cranelift/isle/veri/veri_engine/test_output
2828
crates/explorer/node_modules
2929
tests/all/pulley_provenance_test.cwasm
3030
tests/all/pulley_provenance_test_component.cwasm
31+
tests/all/pulley_provenance_test_async_component.cwasm
3132
/artifacts
3233
testcase*.wat
3334
testcase*.wasm

crates/wasmtime/src/runtime.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ pub(crate) mod code_memory;
3434
#[cfg(feature = "debug-builtins")]
3535
pub(crate) mod debug;
3636
pub(crate) mod externals;
37+
#[cfg(feature = "async")]
38+
pub(crate) mod fiber;
3739
pub(crate) mod gc;
3840
pub(crate) mod instance;
3941
pub(crate) mod instantiate;

0 commit comments

Comments
 (0)