{"record":{"id":"e95367ebb5073f3f","repo":"DioxusLabs/dioxus","slug":"abi-to-be-module-name","errorCode":null,"errorMessage":"abi to be module name","messagePattern":"abi to be module name","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/wasm-split/wasm-split-macro/src/lib.rs","lineNumber":150,"sourceCode":"    let Some(FnArg::Typed(arg)) = params.first().cloned() else {\n        panic!(\n            \"Lazy Loader must define a single input argument to satisfy the LazyLoader signature\"\n        )\n    };\n    let arg_ty = arg.ty.clone();\n    let LoaderNames {\n        name,\n        split_loader_ident,\n        impl_import_ident,\n        impl_export_ident,\n        load_module_ident,\n        ..\n    } = LoaderNames::new(\n        sig.ident.clone(),\n        sig.abi\n            .as_ref()\n            .and_then(|abi| abi.name.as_ref().map(|f| f.value()))\n            .expect(\"abi to be module name\")\n            .to_string(),\n    );\n\n    quote! {\n        {\n            #[cfg(target_arch = \"wasm32\")]\n            {\n                #[link(wasm_import_module = \"./__wasm_split.js\")]\n                unsafe extern \"C\" {\n                    // The function we'll use to initiate the download of the module\n                    #[unsafe(no_mangle)]\n                    fn #load_module_ident(\n                        callback: unsafe extern \"C\" fn(*const ::std::ffi::c_void, bool),\n                        data: *const ::std::ffi::c_void,\n                    );\n\n                    #[allow(improper_ctypes)]\n                    #[unsafe(no_mangle)]","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/wasm-split/wasm-split-macro/src/lib.rs#L132-L168","documentation":"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.","triggerScenarios":"Thrown at packages/wasm-split/wasm-split-macro/src/lib.rs:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a valid module name for the abi in the wasm-split macro; the value must be usable as a module name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}