fitzgen opened PR #10560 from fitzgen:auto-gc-in-ref-new to bytecodealliance:main:
Rather than forcing all callers to check for
GcHeapOutOfMemory, trigger a GC, and then try again. This does force us to define*_asyncvariations for when async is enabled, however; it's ultimately worth it.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested pchickey for a review on PR #10560.
fitzgen requested wasmtime-core-reviewers for a review on PR #10560.
fitzgen requested alexcrichton for a review on PR #10560.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Could this assertion get folded into
new_unchecked?
github-actions[bot] commented on PR #10560:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"Thus the following users have been cc'd because of the following labels:
- fitzgen: wasmtime:ref-types
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen updated PR #10560.
fitzgen updated PR #10560.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Could this get sunk into
retry_after_gc? (and the dual intoretry_after_gc_async?)
alexcrichton created PR review comment:
Could this get sunk into
_new_unchecked? (making it a bit less unchecked)Basically trying to get these multiple entrypoints as a one-liner-ish around the "guts" and the same "guts" are used everywhere
fitzgen updated PR #10560.
fitzgen has enabled auto merge for PR #10560.
fitzgen submitted PR review.
fitzgen created PR review comment:
Not without either making the panic message worse for users or plumbing through extra arguments to the retry functions that are just for the panic message. Neither seems worth the trade off.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Personally I think it's fine to make the panic messages worse given the predicted rarity they'll come up, but I'm ok either way.
fitzgen updated PR #10560.
fitzgen merged PR #10560.
Last updated: Dec 06 2025 at 06:05 UTC