Stream: git-wasmtime

Topic: wasmtime / PR #12415 Introduce `wasmtime::Store::try_new`...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 20:43):

fitzgen opened PR #12415 from fitzgen:handle-oom-in-store-new to bytecodealliance:main:

Store::new is an infallible constructor, so there is not a direct way to make
it return an error on OOM. Additionally, it is one of the most-used functions in
the Wasmtime embedder API, so changing its signature to return a Result is a
non-starter -- it would cause way too much pain. So instead we define
Store::try_new which returns a Result and make Store::new call and unwrap
that new constructor.

Part of https://github.com/bytecodealliance/wasmtime/issues/12069

Depends on

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 20:43):

fitzgen requested alexcrichton for a review on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 20:43):

fitzgen requested wasmtime-core-reviewers for a review on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 20:43):

fitzgen requested wasmtime-fuzz-reviewers for a review on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 21:24):

alexcrichton submitted PR review:

Nice :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:46):

github-actions[bot] added the label fuzzing on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:46):

github-actions[bot] added the label wasmtime:api on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:47):

github-actions[bot] commented on PR #12415:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:52):

fitzgen updated PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:52):

fitzgen requested cfallin for a review on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:52):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:53):

fitzgen has enabled auto merge for PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:54):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:54):

alexcrichton created PR review comment:

This isn't quite sufficient, right? Doesn't the return value need to be checked for a trap?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:56):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:56):

fitzgen created PR review comment:

The wasm-to-builtin trampoline does that, we just happen to always forward results from the builtin out of the trampoline, even if it is just the bool for whether a trap happened (which we know it didn't if the trampoline call returned to Wasm).

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:57):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:57):

fitzgen created PR review comment:

See, for example, Winch's implementation of table.copy:

https://github.com/bytecodealliance/wasmtime/blob/dd47158c7fccb85a7349b57da3fc19dae4eb42a9/winch/codegen/src/visitor.rs#L1674-L1688

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 22:57):

fitzgen edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 23:02):

alexcrichton created PR review comment:

Oh right, indeed!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 23:02):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 23:05):

fitzgen added PR #12415 Introduce wasmtime::Store::try_new, which handles OOM to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 23:28):

github-merge-queue[bot] removed PR #12415 Introduce wasmtime::Store::try_new, which handles OOM from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2026 at 23:31):

alexcrichton commented on PR #12415:

@fitzgen oh to resolve that, you'll need to set Config::concurrency_support(false) after my recent refactoring to avoid allocating a FuturesUnordered

view this post on Zulip Wasmtime GitHub notifications bot (Jan 24 2026 at 01:05):

github-actions[bot] added the label winch on PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 24 2026 at 01:05):

github-actions[bot] commented on PR #12415:

Subscribe to Label Action

cc @saulecabrera

<details>
This issue or pull request has been labeled: "winch"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 19:22):

fitzgen updated PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 19:22):

fitzgen has enabled auto merge for PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 19:37):

fitzgen updated PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 19:50):

fitzgen added PR #12415 Introduce wasmtime::Store::try_new, which handles OOM to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 20:30):

github-merge-queue[bot] removed PR #12415 Introduce wasmtime::Store::try_new, which handles OOM from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 20:30):

fitzgen added PR #12415 Introduce wasmtime::Store::try_new, which handles OOM to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 26 2026 at 23:57):

github-merge-queue[bot] removed PR #12415 Introduce wasmtime::Store::try_new, which handles OOM from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 27 2026 at 00:13):

fitzgen added PR #12415 Introduce wasmtime::Store::try_new, which handles OOM to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 27 2026 at 01:35):

fitzgen merged PR #12415.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 27 2026 at 01:35):

fitzgen removed PR #12415 Introduce wasmtime::Store::try_new, which handles OOM from the merge queue.


Last updated: Jan 29 2026 at 13:25 UTC