Skip to content

Rust nightly broken after 2026-04-04 because of the removal of --allow-undefined from WASM defaults. #26

@EvanCarroll

Description

@EvanCarroll

This causes an upstream bug in Leptos. For a ton of information leptos-rs/cargo-leptos#642

Root cause: rust-lang/rust#149868 removed --allow-undefined from WASM linker
defaults. wasm_split_macros was using extern "Rust" blocks with
#[link(wasm_import_module)], but the compiler ignores wasm_import_module on non-C
ABI blocks (it even warns about this). These symbols were never real WASM imports —
they only worked because --allow-undefined silently imported all undefined symbols.

Fix (in wasm_split_macros/src/lib.rs):

  • Import block: changed from unsafe #declared_abi to unsafe extern "C" with
    #[allow(improper_ctypes)]
  • Export function: split into two cfg branches — extern "C" on WASM (matching the
    import ABI), #declared_abi on non-WASM

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions