Skip to content

Commit

Permalink
Rollup merge of rust-lang#105405 - sunfishcode:sunfishcode/export-dyn…
Browse files Browse the repository at this point in the history
…amic, r=TaKO8Ki

Stop passing -export-dynamic to wasm-ld.

-export-dynamic was a temporary hack added in the early days of the Rust wasm32 target when Rust didn't have a way to specify wasm exports in the source code. This flag causes all global symbols, and some compiler-internal symbols, to be exported, which is often more than needed.

Rust now does have a way to specify exports in the source code: `#[export_name = "..."]`.

So as the original comment suggests, -export-dynamic can now be removed, allowing users to have smaller binaries and better encapsulation in their wasm32-unknown-unknown modules.

It's possible that this change will require existing wasm32-unknown-unknown users will to add explicit `#[export_name = "..."]` directives to exporrt the symbols that their programs depend on having exported.
  • Loading branch information
matthiaskrgr committed Dec 8, 2022
2 parents cea8099 + 36ab96e commit 60c96e6
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 60c96e6

Please sign in to comment.