Skip to content
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

Support no_std in the wasmtime crate #8342

Closed
wants to merge 13 commits into from

Conversation

alexcrichton
Copy link
Member

This is a proof-of-concept implementation in support of #8341. I do not plan on landing this as-is, but instead wanted to open a draft for comments and such. This is missing pieces such as CI integration, for example.

This commit refactors the `wasmtime-runtime` crate to avoid the
`std::panic` module entirely if it's compiled with `panic=abort`. From
an optimization perspective this is not really required since it'll
optimize the same either way with `-Cpanic=abort`, but avoiding
`std::panic` can help make the code a bit more portable. This
refactoring bundles in the `catch_unwind` with the longjmp of the panic
to keep the `#[cfg]` in one location. Callers are then updated as
appropriate.
@alexcrichton alexcrichton requested review from a team as code owners April 11, 2024 21:01
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team April 11, 2024 21:01
@alexcrichton alexcrichton marked this pull request as draft April 11, 2024 21:01
@alexcrichton alexcrichton removed request for a team and fitzgen April 11, 2024 21:01
@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Apr 11, 2024
Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:c-api"

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

  • peterhuene: wasmtime:c-api

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

Learn more.

@alexcrichton
Copy link
Member Author

We've decided to move forward with this and #8341 so I'm going to close this as I'm in the process of splitting this up into more bite-sized chunks and sending them all as individual PRs. I'll update #8341 and close it once this work is complete.

@alexcrichton alexcrichton deleted the no-std branch May 8, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant