Tracking Issue for WebAssembly exception handling
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for wasm native exception handling, which would allow panic=unwind to function properly for code targeting wasm.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Initial compiler support (#111322)
- Standard library support (#121438)
- LLVM support for newest iteration of try/catch instructions (see WebAssembly/exception-handling#280, WebAssembly/exception-handling#296)
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
-
-C target-feature=+exception-handlingvs-C panic=unwind-- does one imply the other, or is one of them redundant?- panic=unwind should enable exception-handling
- Should
-C llvm-args=-wasm-enable-ehbe passed by default on all wasm targets, to be stripped out if theexception-handlingtarget feature is disabled?- yes: afaict
-wasm-enable-ehdoes not affect codegen in general, only isel for the wasm.throw instruction.
- yes: afaict
- Should exception-handling instructions (e.g. from prebuilt libstd) be stripped out if
panic=abort? If so, by whom?wasm-ld?wasm-optdoes currently implement a--strip-ehpass; maybe that's good enough if users want to target wasm MVP?- this problem is similar to the one that
atomics(#77839) faces, of a single prebuilt libstd coming into conflict with some users needing backwards compatibility with wasm-MVP and others wanting to use more recently stabilized features
- this problem is similar to the one that
Implementation history
- #111322
- #121438
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start by reading the linked WebAssembly exception-handling issues and the rustc-dev-guide stabilization and documentation guidance; completion means resolving the remaining LLVM support, documentation, stabilization, and panic=abort checklist items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100