Skip to content

Use naked_asm!, delete asm_func! #11405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Aug 8, 2025

This deletes our home-grown asm_func! macro in favor of using #[unsafe(naked)] functions within Wasmtime. This is needed for fiber-related bits right now where we need tight control over the exact assembly of some functions. This additionally migrates s390x fiber bits to Rust as inline assembly is now stable for s390x.

This deletes our home-grown `asm_func!` macro in favor of using
`#[unsafe(naked)]` functions within Wasmtime. This is needed for
fiber-related bits right now where we need tight control over the exact
assembly of some functions. This additionally migrates s390x fiber bits
to Rust as inline assembly is now stable for s390x.

prtest:full
@alexcrichton
Copy link
Member Author

I'll note that this is a draft PR because naked functions are in Rust 1.88 which is not in our MSRV yet, but I wanted to see if things worked out ahead of time.

@fitzgen
Copy link
Member

fitzgen commented Aug 8, 2025

This additionally migrates s390x fiber bits to Rust as inline assembly is now stable for s390x.

Is this also part of 1.88? If not, then it seems worth it to split out into a PR that can land earlier.

@alexcrichton
Copy link
Member Author

It's possible yeah, but personally I'm content to wait for a release myself

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Aug 8, 2025
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.

2 participants