<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in error_contexts.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>e8189549 - use a single table per instance for resources, waitables, etc. (#11374)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/error_contexts.rs#e8189549</link>
        <description>use a single table per instance for resources, waitables, etc. (#11374)* use a single table per instance for resources, waitables, etc.Per https://github.com/WebAssembly/component-model/pull/513, the spec now putsresources, waitables, waitable sets, subtasks, and error contexts in the sametable per instance.  This updates the implementation to match.- Combine the `ResourceTable` and `StateTable` data structures into a single `HandleTable` structure- Rename `ComponentInstance::instance_resource_tables` to `instance_handle_tables`- Remove `ConcurrentState::waitable_tables` and `error_context_tables` in favor of the above- Move various associated functions from `ConcurrentState` to `ComponentInstance` so they can access `instance_resource_tables`While I was doing table-related things, I also updated `concurrent::Table::new`to reserve the zero handle to mean &quot;invalid&quot;.  This won&apos;t affect what the guestsees in any way, but it allows us to use `TableId::new(0)` to invalidatehost-owned handles in e.g. `{Stream,Future}{Reader,Writer}::close`.Fixes #11189Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;Re-internalize `ResourceKind` to `mod handle_table`Remove `ResourceKind`Start flattening the representation of `Slot`Internalize `get_mut_handle_by_index`Internalize implementation details such as the representation of slotsto and make methods a bit more targeted in their functionality.Internalize more details of `HandleTable`Don&apos;t expose `HandleKind` and of per-function methods for operating onthe various kinds of handles that reside in the table.Flatten the representation of `Slot`There&apos;s still some more work to do for host/guest resource handles, butthis helps realize the goal of the previous refactorings in themeantime.* stop using `HandleTable::reps_to_indexes` when delivering eventsPer review feedback, we&apos;d like to get rid of `HandleTable::reps_to_indexes`entirely.  This commit doesn&apos;t go quite that far, but now we only use it for`error-context` handles.  For waitables, which can only be referenced by at mostone guest at a time, we now store the guest handle in `WaitableCommon::handle`and retrieve it from there when delivering an event for that waitable.For `error-context` handles, the spec requirement that we always lower the samehandle for the same `error-context`, combined with the fact that an`error-context` may be referenced by more than one component instance at a time,means we still need some general way to convert a host rep plus component indexinto a handle.  Going forward, we could consider either removing that &quot;samehandle&quot; requirement from the spec or consider an alternative implementation(e.g. storing a `HashMap&lt;RuntimeComponentIndex, usize&gt;` in the `ErrorContext`host state for keeping track of the handles for each referencing instance.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* remove `HandleTable::reps_to_indexes`Turns out the spec no longer requires that guests receive the same handle for agiven `error-context` as the one they already have, so we no longer need thisfield -- nor do we need to maintain a per-component-instance reference count.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;---------Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/error_contexts.rs</description>
        <pubDate>Tue, 12 Aug 2025 20:34:35 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
<item>
        <title>fa70f025 - implement Component Model async ABI (#11127)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/error_contexts.rs#fa70f025</link>
        <description>implement Component Model async ABI (#11127)* implement Component Model async ABIThis commit replaces the stub functions and types in`wasmtime::runtime::component::concurrent` and its submodules with the workingimplementation developed in the `wasip3-prototyping` repo.  For ease of review,it does not include any new tests; I&apos;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 &lt;joel.dice@fermyon.com&gt;* clear params pointer in `call_async` when future is droppedThis ensures that the closure we pass to `prepare_call` will never see a stalepointer.Note that this could potentially be made more efficient; I&apos;m starting with asimple solution, and we can refine from there.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* Remove unsafety from accessing concurrent async state* Remove a dead variant when async is disabled* Add tests for `tls.rs` unsafe code* Refactor `AbortHandle`* Don&apos;t close over the entire future in the `AbortHandle`, instead  change it to just the bare minimum state to manage aborts.* Move aborting logic into a helper `AbortHandle::run` function which  handles the is-this-aborted-check internally.* Refactor some logic around spawns how `AbortHandle` is  managed/created.* Internalize some functions/types* add FIXME comment to `states.rs`Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* reference issue 11190 in `table.rs` TODOSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* switch `use` directives to conventional syntaxSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* remove redundant accessor methodsSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* reference issue 11191 in `yield` TODO commentsSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* replace `dummy_waker` with `Waker::noop`Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* remove obsolete `AsyncState::spawned_tasks` fieldSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* only call post-return automatically for `call_concurrent`This restores the original behavior of requiring explicit post-return calls for`call[_async]` invocations.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* Favor function arguments before closures* Simplify `watch` a bitMostly move unnecessary state out of the `Arc`.* fix task handle leaks and add test coverageWe weren&apos;t always disposing of guest or host task handles once they becameunreachable.  This adds a couple of hidden methods which integration tests mayuse to guard against use-after-delete, double-delete, and leak bugs regardingwaitable handles.  It also tightens up handle management in `concurrent.rs` toensure those tests pass.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* Encapsulate type erasure in stream buffersDon&apos;t rely on all buffers to handle `TypeId` and assertions and such,instead have a helper type which is the one location of the assertionsand everything else can stay typed.* Remove some methods ending in underscores* Refactor unsafety in `buffers.rs`Mostly move away from raw pointers and instead use utilities like`&amp;[MaybeUninit&lt;T&gt;]`. Also make `WriteBuffer` an `unsafe` trait afterabsorbing the `TakeBuffer` trait. Update all safety-related commentshere and there too.* remove task on drop in `TypedFunc::call_async`This avoids the need for an `Arc`.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* remove obsolete clause from `FutureReader::read` docsSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* unhide and expand docs for `WriteBuffer` and `ReadBuffer`Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* add optional `component-model-async-bytes` featureThis gates interop with the `bytes` crate, making it optional and non-default.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;---------Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;Co-authored-by: Alex Crichton &lt;alex@alexcrichton.com&gt;

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/error_contexts.rs</description>
        <pubDate>Fri, 11 Jul 2025 21:06:04 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
</channel>
</rss>
