rust-lang/rust#156061 (landed in nightly-2026-05-09) switched wasm targets to modern exception handling (-wasm-use-legacy-eh=false). With panic=unwind, LLVM now wraps function bodies in try_table and emits br as the normal exit path, which the descriptor interpreter didn't handle.
(block $outer
(try_table (catch_all $outer)
;; descriptor code
br $outer
)
)
The interpreter handles Block, Try, and TryTable but has no case for Br or BrIf, so they fall through to
the catch-all bail!("unknown instruction").
I observed this trying to use panic=unwind on the latest release of cloudflare/workers-rs:
https://github.com/connyay/cf-nats-ws/actions/runs/25973230210/job/76348826763#step:7:154
rust-lang/rust#156061 (landed in nightly-2026-05-09) switched wasm targets to modern exception handling (
-wasm-use-legacy-eh=false). With panic=unwind, LLVM now wraps function bodies in try_table and emits br as the normal exit path, which the descriptor interpreter didn't handle.The interpreter handles
Block,Try, andTryTablebut has no case forBrorBrIf, so they fall through tothe catch-all
bail!("unknown instruction").I observed this trying to use panic=unwind on the latest release of cloudflare/workers-rs:
https://github.com/connyay/cf-nats-ws/actions/runs/25973230210/job/76348826763#step:7:154