Skip to content

Commit c4020df

Browse files
committed
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 #11114 and #11123; only the third commit is new. Signed-off-by: Joel Dice <[email protected]>
1 parent 54c7113 commit c4020df

File tree

12 files changed

+8457
-818
lines changed

12 files changed

+8457
-818
lines changed

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

Lines changed: 4241 additions & 645 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)