Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit moves all may-leave flag handling into compiled trampolines rather than doing this in Rust. This means it can't be forgotten on the Rust side of things and will be slightly more efficient to boot. This then additionally exempts some intrinsics from checking may-leave since Wasmtime erroneously checked when it shouldn't have.

Closes #12397
Closes #12403

This commit moves all may-leave flag handling into compiled trampolines
rather than doing this in Rust. This means it can't be forgotten on the
Rust side of things and will be slightly more efficient to boot. This
then additionally exempts some intrinsics from checking may-leave since
Wasmtime erroneously checked when it shouldn't have.

Closes bytecodealliance#12397
Closes bytecodealliance#12403
@alexcrichton
Copy link
Member Author

This is a draft for now because the new tests I added are failing (some intrinsics aren't supporting being called in post-return for example) and I need to bottom that out.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tighten/correct/sync may_leave checks for component model intrinsics check may-leave flag automatically for CM intrinsic trampolines

1 participant