SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 44 Rust

Rollup merge of #156571 - daxpedda:wasm-main, r=alexcrichton

Disable `main_needs_argc_argv` for Wasm

AFAIU this explains to the "Rust Runtime" that `main()` doesn't need `argc`/`argv`. Newer Wasm targets have explicitly disabled this, this PR changes it so that the base Wasm configuration affecting all Wasm targets disables this now.

This affects the following targets:
- `wasm32-unknown-unknown`
- `wasm32v1-none`
- `wasm64-unknown-unknown`

The only Wasm target where `main_needs_argc_argv` is still enabled is `wasm32-unknown-emscripten`. @hoodmane let me know and I can remove it there as well.

Credit goes to @Spxg for stumbling on this.

r? @alexcrichton
J
Jonathan Brouwer committed
e34cec62bbab7bfc7e78f32b47c864fa2373e5a7
Committed by GitHub <noreply@github.com> on 5/15/2026, 6:11:44 PM