Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop passing -export-dynamic to wasm-ld. #105405

Merged
merged 1 commit into from
Dec 9, 2022

Commits on Dec 7, 2022

  1. 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.
    sunfishcode committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    3a07aa9 View commit details
    Browse the repository at this point in the history