Skip to content

Commit bee8ccf

Browse files
dicejalexcrichton
authored andcommitted
implement Component Model async ABI
This commit replaces the stub functions and types in `wasmtime::runtime::component::concurrent` and its submodules with the working implementation developed in the `wasip3-prototyping` repo. For ease of review, it does not include any new tests; I'll add those in a follow-up commit. Note that this builds on #11123; only the most recent commit is new. Signed-off-by: Joel Dice <[email protected]>
1 parent a87fe05 commit bee8ccf

File tree

13 files changed

+8500
-832
lines changed

13 files changed

+8500
-832
lines changed

crates/wasmtime/src/runtime/component/concurrent.rs

Lines changed: 4248 additions & 658 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/// Error context reference count local to a given (sub)component
2+
///
3+
/// This reference count is localized to a single (sub)component,
4+
/// rather than the global cross-component count (i.e. that determines
5+
/// when a error context can be completely removed)
6+
#[repr(transparent)]
7+
pub struct LocalErrorContextRefCount(pub(crate) usize);
8+
9+
/// Error context reference count across a [`ComponentInstance`]
10+
///
11+
/// Contrasted to `LocalErrorContextRefCount`, this count is maintained
12+
/// across all sub-components in a given component.
13+
///
14+
/// When this count is zero it is *definitely* safe to remove an error context.
15+
#[repr(transparent)]
16+
pub struct GlobalErrorContextRefCount(pub(crate) usize);

0 commit comments

Comments
 (0)