You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds some documentation about the state of `-Cpanic=unwind`
for the following wasm targets:
* `wasm32-unknown-unknown`
* `wasm32-wasip1`
* `wasm32-wasip2`
* `wasm32v1-none`
Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and
it's also mentioned that there are no concrete proposals at this time to
adding a new set of targets which support unwinding. My hunch is that in
a few years' time it would make sense to enable it by default on these
targets (except for `wasm32v1-none`) but that's a problem for
future folks to debate. For now this is an attempt to document the
status quo.
Which not only rebuilds `std`, `core` and `alloc` (which is somewhat costly and annoying) but more importantly requires the use of nightly Rust toolchains (for the `-Zbuild-std` flag). This is very undesirable for the target audience, which consists of people targeting WebAssembly implementations that prioritize stability, simplicity and/or security over feature support.
108
108
109
109
This `wasm32v1-none` target exists as an alternative option that works on stable Rust toolchains, without rebuilding the stdlib.
110
+
111
+
## Unwinding
112
+
113
+
This target is compiled with `-Cpanic=abort` by default. Using `-Cpanic=unwind`
114
+
would require using the WebAssembly exception-handling proposal stabilized
115
+
mid-2025, and if that's desired then you most likely don't want to use this
116
+
target and instead want to use `wasm32-unknown-unknown` instead. It's unlikely
117
+
that this target will ever support unwinding with the precompiled artifacts
118
+
shipped through rustup. For documentation about using `-Zbuild-std` to enable
0 commit comments