DioxusLabs/dioxus · error

Could not find export

Error message

Could not find export

What it means

`accumulate_split_points` parses wasm-split import names and, after splitting out the module hash and function name, `expect`s to find the matching export in the target module. This panic fires when an import references an export that doesn't exist — indicating a mismatch between the split modules (stale or mismatched wasm inputs), not user code.

Solutions

  1. Check that the export name passed to wasm-split exists in the module; a typo or a symbol removed during compilation will cause this.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/wasm-split/wasm-split-cli/src/lib.rs:1412 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/82a1e7a631089833. Report an issue: GitHub.

Appendix: source

Thrown at packages/wasm-split/wasm-split-cli/src/lib.rs:1412

                return None;
            }

            let ImportKind::Function(import_func) = import.kind else {
                return None;
            };

            // Parse the import name to get the module name, the hash, and the function name
            let remain = import.name.trim_start_matches("__wasm_split_00___");
            let (module_name, rest) = remain.split_once("___00").unwrap();
            let (hash, fn_name) = rest.trim_start_matches("_import_").split_once("_").unwrap();

            // Look for the export with the same name
            let export_name =
                format!("__wasm_split_00___{module_name}___00_export_{hash}_{fn_name}");
            let export_func = module
                .exports
                .get_func(&export_name)
                .expect("Could not find export");
            let export = module.exports.get_exported_func(export_func).unwrap();

            let our_index = index;
            index += 1;

            Some(SplitPoint {
                export_id: export.id(),
                import_id: import.id(),
                module_name: module_name.to_string(),
                import_name: import.name.clone(),
                import_func,
                export_func,
                export_name,
                hash_name: hash.to_string(),
                component_name: fn_name.to_string(),
                index: our_index,
                reachable_graph: Default::default(),
            })

View on GitHub (pinned to 24f6a829df)