Skip to content

Core crate doesn't support panic="abort" in 1.90 wasm32-unknown-emscripten #148246

@curiousdannii

Description

@curiousdannii

I'm trying to shrink my WASM output, and wanted to try panic="abort", but I'm getting an error saying that the core crate requires the unwind panic strategy.

Rust version: 1.90.0 (stable)
Target: wasm32-unknown-emscripten

Cargo invocation:

RUSTFLAGS=-Csymbol-mangling-version=v0 cargo build --release --target=wasm32-unknown-emscripten 

Compiler output:

 Compiling remglk v0.1.0 (/src/remglk/remglk) Compiling remglk_capi v0.1.0 (/src/remglk/remglk_capi) error: the crate `core` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort` error: could not compile `remglk_capi` (lib) due to 1 previous error 

In my searches I haven't seen anyone have panic strategy troubles for the core crate before, which I take either means that I'm doing something very weird with my setup, or that wasm32-unknown-emscripten is not used much any more.

I've tested, and panic="abort" did work in 1.89, and it works in 1.90 on x86_64-unknown-linux-gnu. So this seems particular to the Emscripten target, and it's a new regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-panicArea: Panicking machineryC-bugCategory: This is a bug.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itO-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions