<?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 resource_stream.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>da093747 - Relax panics in async/futures to traps/errors (#12688)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#da093747</link>
        <description>Relax panics in async/futures to traps/errors (#12688)* Relax panics in async/futures to traps/errorsThis commit is an admittance that I don&apos;t believe we&apos;re going to getto a point where we are confident enough in the fuzzing ofcomponent-model-async such that we could confidently say we&apos;reexercising the vast majority of possible panics. Development ofcomponent-model-async has shown a steady trickle of panics over thecourse of the development of the feature, and this trend has beenpersistent over time as well.An attempt was made in #12119 to add a fuzzer dedicated to async eventsbut that didn&apos;t actually find anything in development and it has misseda number of panics present before and discovered after its introduction.Overall I do not know how to improve the fuzzer to the point that itwould find pretty much all of the existing async-related panics overtime.To help address this concern of the `concurrent.rs` implementation thiscommit goes through and replaces things like `unwrap()`, `assert!`,`panic!`, and `unreachable!` with an error-producing form. The benefitof this is that a bug in the implementation is less likely to result ina panic and instead just results in a non-spec-compliant trap. Thedownside of doing this though is that it can become unclear what errorsare &quot;first class traps&quot;, or expected to be guest reachable, and whichare expected to be bugs in Wasmtime. To help address this I&apos;ve performeda few refactorings here as well.* Some traps previously present as error strings are now promoted to  using `Trap::Foo` instead. This has some refactoring of the Rust/C  side as well to make it easier to define new variants. Tests were  additionally added for any trap messages that weren&apos;t previously  tested as being reachable.* A new `bail_bug!` macro was added (internally) for Wasmtime. This is  coupled with a concrete `WasmtimeBug` error type (exported as  `wasmtime::WasmtimeBug`). The intention is that `bail!` continues to  be &quot;here&apos;s a string and I&apos;m a bit too lazy to make a concrete error&quot;  while `bail_bug!` indicates &quot;this is a bug in wasmtime please report  this if you see it&quot;.The rough vision is that if an error condition is reached, and the systemis not broken in such a way that panicking is required, then `bail_bug!`can be used to indicate a bug in Wasmtime as opposed to panicking. Thisreduces the real-world impact of hitting these scenarios by downgrading aCVE-worthy `panic!` into a bug-worthy non-spec-compliant trap. Not allpanics are able to be transitioned to this as some are load bearing froma safety perspective or similar (or indicate something equally broken),but the vast majority of cases are suitable for &quot;return a trap, lockdown the store, and let destructors take care of everything else&quot;.This change additionally has resulted in API changes for `FutureReader`and `StreamReader`. For example creation of these types now returns a`Result` for when the `ResourceTable` is full, for example, instead ofpanicking.* Fix CI build* Translate `WasmtimeBug` to panics in debug mode* Review comments* Refactor some stream methods for fewer panics

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Mon, 02 Mar 2026 21:26:40 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>799534a9 - Migrate component model async tests to `wasmtime::error` (#12270)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#799534a9</link>
        <description>Migrate component model async tests to `wasmtime::error` (#12270)* Migrate component model async tests to `wasmtime::error`* fix and review feedback

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Wed, 07 Jan 2026 22:46:51 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>8c03849b - Use `.` instead of `/` for interface members. (#11947)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#8c03849b</link>
        <description>Use `.` instead of `/` for interface members. (#11947)* Use `.` instead of `/` for interface members.In the `wasmtime::component::generate` macro, change the syntax forreferencing functions and types inside interfaces to use `.` insteadof `/`.For example, this changes strings like  `wasi:http/types/outgoing-body`to  `wasi:http/types.outgoing-body`.This makes the syntax more consistent with the syntax of[WIT `use` statements], which use `.` for this purpose.And, it avoids an incompatibility with the future nested namespaces syntax([&#55358;&#57018;]), where the `/d` in `a:b/c/d` is for traversing a component exportrather than an interface member.[WIT `use` statements]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-packages-and-use[&#55358;&#57018;]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#gated-features* Use the new syntax in more places.* Revert changes to vendored WIT files.* Revert more changes to vendored files.* Update syntax in more places.

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Mon, 27 Oct 2025 21:23:36 +0000</pubDate>
        <dc:creator>Dan Gohman &lt;dev@sunfishcode.online&gt;</dc:creator>
    </item>
<item>
        <title>7e39c25e - move `ConcurrentState` from `ComponentInstance` to `Store` (#11796)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#7e39c25e</link>
        <description>move `ConcurrentState` from `ComponentInstance` to `Store` (#11796)* move `ConcurrentState` from `ComponentInstance` to `Store`This has a few benefits:- No need to specify an instance when creating or piping from a stream or future.- No need to track the instance in an `Accessor`.- You may now execute tasks for multiple instances in a single event loop.The main drawback is that, if one of several instances within a single storetraps, it effectively means all instances have trapped, and the store can&apos;t beused to create new instances.  The way to avoid that is to use separate storesfor instances which must be isolated from others.As a result of this change, a lot of code had to move from e.g. `impl Instance`to e.g. `impl StoreOpaque`, so the diff is pretty huge, but the changesthemselves are almost entirely non-functional.Fixes #11226Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* fix non-component-model-async buildSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* fix outdated doc commentSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* address review feedback- restore `ComponentStoreData` encapsulation- avoid conditional code duplication in `LiftContext::new`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/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Mon, 06 Oct 2025 19:53:10 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
<item>
        <title>5764da5f - Revamp component model stream/future host API (again) (#11515)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#5764da5f</link>
        <description>Revamp component model stream/future host API (again) (#11515)* Revamp component model stream/future host API (again)This changes the host APIs for dealing with futures and streams from a&quot;rendezvous&quot;-style API to a callback-oriented one.Previously you would create e.g. a `StreamReader`/`StreamWriter` pair and calltheir `read` and `write` methods, respectively, and those methods would return`Future`s that resolved when the operation was matched with a corresponding`write` or `read` operation on the other end.With the new API, you instead provide a `StreamProducer` trait implementationwhe creating the stream, whose `produce` method will be called as soon as a readhappens, giving the implementation a chance to respond immediately withoutmaking the reader wait for a rendezvous.  Likewise, you can match the read endof a stream to a `StreamConsumer` to respond immediately to writes.  This modelshould reduce scheduling overhead and make it easier to e.g. pipe items to/from`AsyncWrite`/`AsyncRead` or `Sink`/`Stream` implementations without needing toexplicitly spawn background tasks.  In addition, the new API provides directaccess to guest read and write buffers for `stream&lt;u8&gt;` operations, enablingzero-copy operations.Other changes:- I&apos;ve removed the `HostTaskOutput`; we were using it to run extra code with  access to the store after a host task completes, but we can do that more  elegantly inside the future using `tls::get`.  This also allowed me to  simplify `Instance::poll_until` a bit.- I&apos;ve removed the `watch_{reader,writer}` functionality; it&apos;s not needed now  given that the runtime will automatically dispose of the producer or consumer  when the other end of the stream or future is closed -- no need for embedder  code to manage that.- In order to make `UntypedWriteBuffer` `Send`, I had to wrap its raw pointer  `buf` field in a `SendSyncPtr`.- I&apos;ve removed `{Future,Stream}Writer` entirely and moved  `Instance::{future,stream}` to `{Future,Stream}Reader::new`, respectively.- I&apos;ve added a bounds check to the beginnings of `Instance::guest_read` and  `Instance::guest_write` so that we need not do it later in  `Guest{Source,Destination}::remaining`, meaning those functions can be  infallible.Note that I haven&apos;t updated `wasmtime-wasi` yet to match; that will happen inone or more follow-up commits.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* Add `Accessor::getter`, rename `with_data` to `with_getter`* fixup bindgen invocationSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* add support for zero-length writes/reads to/from hostI&apos;ve added a test to cover this; it also tests direct buffer access for`stream&lt;u8&gt;`, which I realized I forgot to cover earlier.  And of course therewas a bug :facepalm:.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* add `{Destination,Source}::remaining` methodsThis can help `Stream{Producer,Consumer}` implementations determine how manyitems to write or read, respectively.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* wasi: migrate sockets to new APISigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* tests: read the socket stream until EOFSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3-sockets: account for cancellationSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3-sockets: mostly ensure byte buffer cancellation-safetySigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3-filesystem: switch to new APISigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* fixup! p3-sockets: mostly ensure byte buffer cancellation-safety* p3-cli: switch to new APISigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3: limit maximum buffer sizeSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3-sockets: remove reuseaddr test loop workaroundSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* p3: drive I/O in `when_ready`Signed-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* fixup! p3: drive I/O in `when_ready`* Refine `Stream{Producer,Consumer}` APIsPer conversations last week with Roman, Alex, and Lann, I&apos;ve updated thesetraits to present a lower-level API based on `poll_{consume,produce}` functionsand have documented the implementation requirements for various scenarios whichhave come up in `wasmtime-wasi`, particularly around graceful cancellation.  Seethe doc comments for those functions for details.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* being integration of new APISigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* update wasi/src/p3/filesystem to use new stream APIThis is totally untested so far; I&apos;ll run the tests once we have everything elsecompiling.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* update wasi/src/p3/cli to use new stream APIThis is totally untested and doesn&apos;t even compile yet due to a lifetime issue Idon&apos;t have time to address yet.  I&apos;ll follow up later with a fix.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* fix: remove `&apos;a` bound on `&amp;self`Signed-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* finish `wasi:sockets` adaptationSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* finish `wasi:cli` adaptationNote, that this removes the read optimization - let&apos;s get theimplementation complete first and optimize laterSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* remove redundant loop in socketsSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* wasi: buffer on 0-length readsSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* finish `wasi:filesystem` adaptationSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* remove `MAX_BUFFER_CAPACITY`Signed-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* refactor `Cursor` usageSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* impl Default for VecBufferSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* refactor: use consistent import stylingSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* feature-gate fs Arc accessorsSigned-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;* Update test expectations---------Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;Signed-off-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;Co-authored-by: Alex Crichton &lt;alex@alexcrichton.com&gt;Co-authored-by: Roman Volosatovs &lt;rvolosatovs@riseup.net&gt;

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Thu, 04 Sep 2025 21:12:18 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
<item>
        <title>0a074afc - Simplify WASI internal implementations (#11365)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#0a074afc</link>
        <description>Simplify WASI internal implementations (#11365)* Simplify WASI internal implementationsThis commit migrates the WASIp2 implementation to be closer to theupcoming WASIp3 implementation in terms of how things are implementedinternally. Previously the way things worked with WASIp2 is:* Embedders call `add_to_linker` with `T: WasiView`* Internally `add_to_linker` is called which creates `WasiImpl&lt;&amp;mut T&gt;`* All internal implementations were `impl&lt;T&gt; Host for WasiImpl&lt;T&gt; where T: WasiView`* A forwarding impl of `impl&lt;T: WasiView&gt; WasiView for &amp;mut T` was  requiredWhile this all worked it&apos;s a bit complicated for a few reasons:1. Dealing with generically named structures like `WasiImpl` (or   `IoImpl` or `WasiHttpImpl`) is a bit baroque and not always obvious   as to what&apos;s going on.2. The extra layer of generics in `impl&lt;T&gt; Host for WasiImpl&lt;T&gt;` adds a   layer of conceptual indirection which is non-obvious.3. Other WASI proposal implementations do not use this strategy and   instead use &quot;view&quot; types or `impl Host for TheType` for example.4. Internal incantations of `add_to_linker` had to deal with mixtures of   `IoImpl` and `WasiImpl` and aligning everything just right.5. An extra layer of generics on all impls meant that everything was   generic meaning that `wasmtime-wasi`-the-crate didn&apos;t generate much   code, causing longer codegen times for consumers.The goal of this commit is to migrate towards the style of what WASIp3is prototyping for how impls are modeled. This is done to increase theamount of code that can be shared between WASIp2 and WASIp3. This has anumber of benefits such as being easier to understand and also beingmore modular where `wasi:clocks` implementations of traits don&apos;t requirefilesystem context to be present (as is the case today). This in theoryhelps a more mix-and-match paradigm of blending together various bitsand pieces of `wasmtime-wasi` implementations.Concretely the changes made here are:* `WasiView` no longer inherits from `IoView`, they&apos;re unrelated traits  now.* `WasiView` now returns `WasiViewCtx&lt;&apos;a&gt;` which has `ctx: &amp;&apos;a mut WasiCtx`  and `table: &amp;&apos;a mut ResourceTable`. That means it basically does the  same thing before but in a slightly different fashion.* Implementations of `Host` traits are now directly for  `WasiCtxView&lt;&apos;_&gt;` and don&apos;t involve any generics at all. These are  hopefully easier to understand and also better from a  codegen/compile-time perspective.* Embedders no longer need to implement `IoView` directly and instead  fold that functionality into `WasiView`.* `WasiHttpView` no longer inherits from `IoView` and instead has a  direct `fn table` method. Additionally `WasiHttpImpl` no longer embeds  `IoImpl` inside of it.* Host traits for `wasi:io` are now implemented directly for  `ResourceTable` instead of `IoImpl&lt;T&gt;`.The immediate goal of this refactoring is to enable more sharing alongthe lines of #11362. This was not possible prior because WASIp3 requiresa simultaneous borrow on the table/ctx while the trait hierarchypreviously gave you one-or-the-other. With this new organization it willbe possible to get both at the same time meaning morestructure/contexts/etc can be shared between implementations.prtest:full* CI fixes* More CI fixes* More CI fixes

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Fri, 01 Aug 2025 01:24:24 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>b4475438 - refactor `{Stream,Future}|{Reader,Writer}` APIs and internals (#11325)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#b4475438</link>
        <description>refactor `{Stream,Future}|{Reader,Writer}` APIs and internals (#11325)* refactor `{Stream,Future}|{Reader,Writer}` APIs and internalsThis makes a several changes to how `{Stream,Future}|{Reader,Writer}` work tomake them more efficient and, in some ways, more ergonomic:- The background tasks have been removed, allowing reads and writes to complete without task context switching.  We now only allocate and use oneshot channels lazily when the other end is not yet ready; this improves real world performance benchmarks (e.g. wasi-http request handling) considerably.- Instances of `{Stream,Future}Reader` can now be lifted and lowered directly; no need for `Host{Stream,Future}` anymore.- The type parameter for `Stream{Reader,Writer}` no longer refers to the buffer type -- just the payload type (i.e. `StreamReader&lt;u8&gt;` instead of `StreamReader&lt;Vec&lt;u8&gt;&gt;`), meaning any buffer type may be used for a given read or write operation.  This also means the compiler needs help with type inference less often when calling `Instance::stream`.- Instances of `{Stream,Future}|{Reader,Writer}` now require access to the store in order to be disposed of properly.  I&apos;ve added RAII wrapper structs (`WithAccessor[AndValue]`) to help with this, and also updated `Store::drop` and `Instance::run_concurrent` to ensure the store thread-local is set when dropping futures closing over `&amp;Accessor`s.- In order to ensure that resources containing `{Stream,Future}|{Reader,Writer}` instances are disposed of properly, I&apos;ve added `LinkerInstance::resource_concurrent` and have updated `wasmtime-wit-bindgen` to use it.  This gives resource drop functions access to a `StoreContextMut` via an `Accessor`, allowing the stream and future handles to be disposed of.    - In order to make this work, I had to change `Accessor::instance` from a `Instance` to an `Option&lt;Instance&gt;`, which is awkward but temporary since we&apos;re planning to remove `Accessor::instance` entirely once we&apos;ve moved concurrent state from `ComponentInstance` to `Store`.That problem of disposal is definitely the most awkward part of all this.  Insimple cases, it&apos;s easy enough to ensure that read and write handles aredisposed of properly, but both `wasmtime-wasi` and `wasmtime-wasi-http` havesome pretty complicated functions where handles are passed between tasks and/orstored inside resources, so it can be tricky to ensure proper disposal on allcode paths.  I&apos;m open to ideas for improving this, but I suspect we&apos;ll need newRust language features (e.g. linear types) to make it truly ergonomic, robust,and efficient.While testing the above, I discovered an issue with `Instance::poll_until` suchthat it would prematurely give up and return a &quot;deadlock&quot; trap error, believingthat there was no further work to do, even though the future passed to it wasready to resolve the next time it was polled.  I&apos;ve fixed this by polling it onelast time and only trapping if it returns pending.Note that I&apos;ve moved a few associated functions from `ConcurrentState` to`Instance` (e.g. `guest_drop_writable` and others) since they now need access tothe store; they&apos;re unchanged otherwise.  Apologies for the diff noise.Finally, I&apos;ve tweaked how `wasmtime serve` to poll the guest for content beforehanding the response to Hyper, which helps performance by ensuring the firstcontent chunk can be sent with the same TCP packet as the beginning of theresponse.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;fix wasi p3 build and test failuresSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;use `ManuallyDrop` instead of `Option` in `Dropper`This allows us to drop its `value` field in-place, i.e. without moving it,thereby upholding the `Pin` guarantee.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;address review comments- Remove `DropWithStoreAndValue` and friends; go back to taking a `fn() -&gt; T` parameter in `Instance::future` instead- Make `DropWithStore::drop[_with]` take `&amp;mut self` instead of `self`- Make `WithAccessor` and `DropWithStore` private    - Instead, I&apos;ve added public `Guarded{Stream,Future}{Reader,Writer}` types for RAII    - and also `{Stream,Future}{Reader,Writer}::close[_with]` methods- Use RAII in `FutureReader::read` and `FutureWriter::write` to ensure handles are dropped if the `Future` is droppedSigned-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* lower host stream/future writes in background taskThis avoids unsoundness due to guest realloc calls while there are host embedderframes on the stack.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* fix `tcp.rs` regressionsSigned-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/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Wed, 30 Jul 2025 16:40:41 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
<item>
        <title>1155d6df - Redesign function configuration in `bindgen!` (#11328)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#1155d6df</link>
        <description>Redesign function configuration in `bindgen!` (#11328)* Redesign function configuration in `bindgen!`This commit is a redesign of how function-level configuration works inWasmtime&apos;s `bindgen!` macro. The main goal of this redesign is tobetter support WASIp3 and component model async functions. Prior to thisredesign there was a mish mash of mechanisms to configure behavior ofimports/exports:* The `async` configuration could turn everything async, nothing async,  only some imports async, or everything except some imports async.* The `concurrent_{imports,exports}` keys were required to explicitly  opt-in to component model async signatures and applied to all  imports/exports.* The `trappable_imports` configuration would indicate a list of imports  allowed to trap and it had special configuration for everything,  nothing, and only a certain list.* The `tracing` and `verbose_tracing` keys could be applied to either  nothing or all functions.Overall the previous state of configuration in `bindgen!` was clearly ahodgepodge of systems that organically grew over time. In my personalopinion it was in dire need of a refresh to take into account howcomponent-model-async ended up being implemented as well asconsolidating the one-off systems amongst all of these configurationkeys. A major motivation of this redesign, for example, was to inheritbehavior from WIT files by default. An `async` function in WIT shouldnot require `concurrent_*` keys to be configured, but rather it shouldgenerate correct bindings by default.In this commit, all of the above keys were removed. All keys have beenreplaced with `imports` and `exports` configuration keys. Each behavesthe same way and looks like so:    bindgen!({        // ...        imports: {            // enable tracing for just this function            &quot;my:local/interface/func&quot;: tracing,            // enable verbose tracing for just this function            &quot;my:local/interface/other-func&quot;: tracing | verbose_tracing,            // this is blocking in WIT, but generate async bindings for            // it            &quot;my:local/interface/[method]io.block&quot;: async,            // like above, but use &quot;concurrent&quot; bindings which have            // access to the store.            &quot;my:local/interface/[method]io.block-again&quot;: async | store,            // everything else is, by default, trappable            default: trappable,        },    });Effectively all the function-level configuration items are now bitflags.These bitflags are by default inherited from the WIT files itself (e.g.`async` functions are `async | store` by default). Further configurationis then layered on top at the desires of the embedder. Supported keys are:* `async` - this means that a Rust-level `async` function should be  generated. This is either `CallStyle::Async` or  `CallStyle::Concurrent` as it was prior, depending on ...* `store` - this means that the generated function will have access to  the store on the host. This is only implemented right now for `async |  store` functions which map to `CallStyle::Concurrent`. In the future  I&apos;d like to support just-`store` functions which means that you could  define a synchronous function with access to the store in addition to  an asynchronous function.* `trappable` - this means that the function returns a  `wasmtime::Result&lt;TheWitBindingType&gt;`. If `trappable_errors` is  applicable then it means just a `Result&lt;TheWitOkType,  TrappableErrorType&gt;` is returned (like before)* `tracing` - this enables `tracing!` integration for this function.* `verbose_tracing` - this logs all argument values for this function  (including lists).* `ignore_wit` - this ignores the WIT-level defaults of the function  (e.g. ignoring WIT `async`).The way this then works is all modeled is that for any WIT functionbeing generated there are a set of flags associated with that function.To calculate the flags the algorithm looks like:1. Find the first matching rule in the `imports` or `exports` map   depending on if the function is imported or exported. If there is no   matching rule then use the `default` rule if present. This is the   initial set of flags for the function (or empty if nothing was   found).2. If `ignore_wit` is present, return the flags from step 1. Otherwise   add in `async | store` if the function is `async` in WIT.The resulting set of flags are then used to control how everything isgenerated. For example the same split traits of today are stillgenerated and it&apos;s controlled based on the flags. Note though that theprevious `HostConcurrent` trait was renamed to `HostWithStore` to makespace for synchronous functions in this trait in the future too.The end result of all these changes is that configuring imports/exportsnow uses the exact same selection system as the `with` replacement map,meaning there&apos;s only one system of selecting functions instead of 3.WIT-level `async` is now respected by default meaning that bindings workby default without further need to configure anything (unless morefunctionality is desired).One final minor change made here as well is that auto-generated`instantiate` methods are now always synchronous and an`instantiate_async` method is unconditionally generated for async mode.This means that bindings always generate both functions and it&apos;s up tothe embedder to choose the appropriate one.Closes #11246Closes #11247* Update expanded test expectationsprtest:full* Fix the min platform embedding example* Fix doc tests* Always generate `*WithStore` traitsThis helps when using the `with` mapping since that can always assumethat `HostWithStore` is available in the generated bindings, avoidingthe need to duplicate configuration options.* Update test expectations* Review comments

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Mon, 28 Jul 2025 18:31:06 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>6809d547 - Take `&amp;mut self` in `Stream{Reader,Writer}` methods (#11261)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#6809d547</link>
        <description>Take `&amp;mut self` in `Stream{Reader,Writer}` methods (#11261)This commit updates the various methods of `Stream{Reader,Writer}` totake a mutable reference to `self` instead of `self`-by-value. This issomething which I personally feel is more idiomatic and avoidscumbersome and possibly frequent move-in-and-move-out style code. Thisis additionally coupled with a new `is_closed` method on each of thesetypes to determine if the stream&apos;s other end has been closed after thelast read/write operation.Closes #11219

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Wed, 16 Jul 2025 22:45:04 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>c34eb3f7 - Require `Accessor` on all future/stream functions (#11250)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#c34eb3f7</link>
        <description>Require `Accessor` on all future/stream functions (#11250)* Require `Accessor` on all future/stream functionsThis is a follow-up to #11238 which adds `&amp;Accessor` arguments to allfunctions for futures and streams. Like #11238 this is done to makefuture refactorings easier for the internal implementation but theinternal implementations are not updated at this time. Many functions,for example, do not use the argument at all just yet. The purpose ofthis is to ensure host usage of these functions always provides a storecontext.This change required large refactorings of the upcomingwasmtime-wasi-http implementation in the wasip3-prototyping repository.That&apos;s all been sorted out now though so the changes are being pulledback here into the Wasmtime repository as well.This commit additionally changes the `watch_*` functions on the variousstream/future types to take `&amp;mut self` instead of `self`-by-value. This ismostly a stylistic change and is more API-driven than anything else.Functionally this behaves the same as before where, while watching, thestream/future cannot be read/written to otherwise.* Review comments

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Wed, 16 Jul 2025 14:40:57 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>64bc3bd9 - Start to use `&amp;Accessor&lt;T, D&gt;` more in concurrent code (#11238)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#64bc3bd9</link>
        <description>Start to use `&amp;Accessor&lt;T, D&gt;` more in concurrent code (#11238)* Start to use `&amp;Accessor&lt;T, D&gt;` more in concurrent codeAfter discussion with Joel we&apos;ve concluded that while `&amp;mut Accessor&lt;T, D&gt;`was originally added to model host functions it is also appropriate touse it to model embedder-rooted invocations of items such as wasm aswell. Effectively the conclusion we reached was that`*::call_concurrent` should be taking `&amp;Accessor`, not`StoreContextMut`. This has a number of benefits to it over the previousiteration:* This makes exports behave more like imports where `Accessor` means  &quot;you&apos;re in the concurrent world&quot;.* This makes exports have an `async fn` signature which is easier to  read and understand.* This automatically enforces the guarantee that the returned future is  only polled within the main event loop because the future is always  considered to close over the `&amp;Accessor` provided meaning it  statically cannot live outside of the event loop.* This paves the way forward to future refactorings to avoid storing so  much state within a `Store&lt;T&gt;` and instead try to store state directly  in futures themselves. This should make cancellation more natural and  eventually also remove `&apos;static` bounds on params/results. Furthermore  this should make it easier to avoid spawning tasks internally by  storing state in futures instead of spawned tasks.In doing this one of the main questions we were faced with was what todo about `&amp;mut Accessor&lt;T, D&gt;`, namely the `mut` part. With a mutableaccessor it would be only possible to call one function concurrently.One option considered was to add combinators like `Accessor::join` and`Accessor::race` but in the end we decided to avoid going that directionand instead switch to `&amp;Accessor&lt;T, D&gt;` everywhere, freely enablingaliasing of the accessor. This has the downside that `Accessor::with` isnow a relatively dangerous function in that it can panic, but idiomaticusage of it is not expected to panic as the distinction between the`async` and sync boundary of `Accessor` vs `StoreContextMut` is expectedto naturally make the recursive panic condition of `with` rare to comeup in practice.Concrete changes in this commit are:* `Accessor::with` now requires `&amp;self`.* `Accessor::spawn` now requires `&amp;self`.* Host functions are now given `&amp;Accessor`, not `&amp;mut Accessor`.* `{Typed,}Func::call_concurrent` is now an `async fn` which takes an  `&amp;Accessor` instead of `StoreContextMut`.* Guest bindings generation for concurrent invocations now looks exactly  like async bindings generation except for replacing `StoreContextMut`  with `Accessor`.Note that this commit does not yet update the internal implementationsof these functions to benefit from the new abilities that taking`&amp;Accessor` implies. Instead that&apos;s deferred to a future update asnecessary. Instead this is only updating the public API of the`wasmtime` crate to enable these refactorings in the future.Also note that this does not yet update all functions to take`&amp;Accessor`. Notably futures and streams still need to be updated.cc #11224* Review comments---------Co-authored-by: Joel Dice &lt;joel.dice@fermyon.com&gt;

            List of files:
            /wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Tue, 15 Jul 2025 15:14:02 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>804060c8 - add Component Model async ABI tests (#11136)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/misc/component-async-tests/src/resource_stream.rs#804060c8</link>
        <description>add Component Model async ABI tests (#11136)* add Component Model async ABI testsThis pulls in the tests from the `wasip3-prototyping` repo, minus the onesrequiring WASIp3 support in `wasmtime-wasi[-http]`, which will be PR&apos;dseparately.* add audits and exemptions for new `component-async-tests` depsIn order to convince `cargo vet` that we only needed these deps to be`safe-to-run` (not necessarily `safe-to-deploy`, since it&apos;s test code), I&apos;vemoved the `wasm-compose` dep to the `dev-dependencies` section of the`Cargo.toml` file, which required rearranging some code.I&apos;ve exempted `wasm-compose` since it&apos;s a BA project, and also exempted all butone of the remaining new deps since they each get well over 10,000 downloads perday from crates.io.  I&apos;ve audited and certified the remaining dep, `im-rc`,which came in a bit shy of the 10,000-per-day mark.Signed-off-by: Joel Dice &lt;joel.dice@fermyon.com&gt;* simplify `component_async_tests::util::sleep`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/misc/component-async-tests/src/resource_stream.rs</description>
        <pubDate>Fri, 11 Jul 2025 23:32:19 +0000</pubDate>
        <dc:creator>Joel Dice &lt;joel.dice@fermyon.com&gt;</dc:creator>
    </item>
</channel>
</rss>
