fitzgen opened PR #12473 from fitzgen:wasmtime-core-undo to bytecodealliance:main:
This is a helper for undoing partial/incremental side effects when their larger associated operation fails, so that state remains coherent and operations can have "all or nothing" semantics.
<!--
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 wasmtime-core-reviewers for a review on PR #12473.
fitzgen requested dicej for a review on PR #12473.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
This'll
mem::forget::<F>which I believe would leak, right?
alexcrichton created PR review comment:
Perf-wise this might be worth the small amount of unsafe for storing these as
ManuallyDrop<T>andManuallyDrop<F>instead ofOption?
alexcrichton submitted PR review.
fitzgen submitted PR review.
fitzgen created PR review comment:
Good catch
fitzgen updated PR #12473.
fitzgen has enabled auto merge for PR #12473.
fitzgen added PR #12473 Add the wasmtime_core::undo::Undo helper to the merge queue.
github-merge-queue[bot] removed PR #12473 Add the wasmtime_core::undo::Undo helper from the merge queue.
fitzgen updated PR #12473.
fitzgen has enabled auto merge for PR #12473.
fitzgen added PR #12473 Add the wasmtime_core::undo::Undo helper to the merge queue.
fitzgen merged PR #12473.
fitzgen removed PR #12473 Add the wasmtime_core::undo::Undo helper from the merge queue.
Last updated: Feb 24 2026 at 04:36 UTC