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
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):
#[allow(improper_ctypes)]
import ABI), #declared_abi on non-WASM