DioxusLabs/dioxus · error
abi to be module name
Error message
abi to be module name
What it means
The lazy loader macro requires the annotated function to declare an extern ABI name (extern "C" etc.), because the ABI string is used to derive the split-module name. The function is missing the abi literal entirely.
Source
Thrown at packages/wasm-split/wasm-split-macro/src/lib.rs:150
let Some(FnArg::Typed(arg)) = params.first().cloned() else {
panic!(
"Lazy Loader must define a single input argument to satisfy the LazyLoader signature"
)
};
let arg_ty = arg.ty.clone();
let LoaderNames {
name,
split_loader_ident,
impl_import_ident,
impl_export_ident,
load_module_ident,
..
} = LoaderNames::new(
sig.ident.clone(),
sig.abi
.as_ref()
.and_then(|abi| abi.name.as_ref().map(|f| f.value()))
.expect("abi to be module name")
.to_string(),
);
quote! {
{
#[cfg(target_arch = "wasm32")]
{
#[link(wasm_import_module = "./__wasm_split.js")]
unsafe extern "C" {
// The function we'll use to initiate the download of the module
#[unsafe(no_mangle)]
fn #load_module_ident(
callback: unsafe extern "C" fn(*const ::std::ffi::c_void, bool),
data: *const ::std::ffi::c_void,
);
#[allow(improper_ctypes)]
#[unsafe(no_mangle)]View on GitHub (pinned to 24f6a829df)
Solutions
- Pass a valid module name for the abi in the wasm-split macro; the value must be usable as a module name.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/wasm-split/wasm-split-macro/src/lib.rs:150 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/e95367ebb5073f3f.
Report an issue: GitHub.