{"record":{"id":"848d559ef4bc13f7","repo":"wasmerio/wasmer","slug":"custom-descriptors-not-implemented-yet-848d55","errorCode":null,"errorMessage":"custom-descriptors not implemented yet","messagePattern":"custom-descriptors not implemented yet","errorType":"panic","errorClass":"panic","httpStatus":null,"severity":"error","filePath":"lib/compiler/src/translator/sections.rs","lineNumber":424,"sourceCode":"            ref kind,\n            index,\n        } = entry.map_err(from_binaryreadererror_wasmerror)?;\n\n        // The input has already been validated, so we should be able to\n        // assume valid UTF-8 and use `from_utf8_unchecked` if performance\n        // becomes a concern here.\n        let index = index as usize;\n        match *kind {\n            ExternalKind::Func => environ.declare_func_export(FunctionIndex::new(index), field)?,\n            ExternalKind::Table => environ.declare_table_export(TableIndex::new(index), field)?,\n            ExternalKind::Memory => {\n                environ.declare_memory_export(MemoryIndex::new(index), field)?\n            }\n            ExternalKind::Global => {\n                environ.declare_global_export(GlobalIndex::new(index), field)?\n            }\n            ExternalKind::Tag => environ.declare_tag_export(TagIndex::new(index), field)?,\n            ExternalKind::FuncExact => unimplemented!(\"custom-descriptors not implemented yet\"),\n        }\n    }\n\n    environ.finish_exports()?;\n    Ok(())\n}\n\n/// Parses the Start section of the wasm module.\npub fn parse_start_section(index: u32, environ: &mut ModuleEnvironment) -> WasmResult<()> {\n    environ.declare_start_function(FunctionIndex::from_u32(index))?;\n    Ok(())\n}\n\nfn read_elems(items: &ElementItems) -> WasmResult<Box<[FunctionIndex]>> {\n    let mut out = Vec::new();\n\n    match items {\n        ElementItems::Functions(funcs) => {","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler/src/translator/sections.rs#L406-L442","documentation":"The export-section parser does not support the FuncExact external kind, which comes from the custom-descriptors / GC-related proposal extensions. When parse_export_section encounters an export whose ExternalKind is FuncExact, it panics with unimplemented! instead of calling an environ declare method. Standard export kinds (func, table, memory, global, tag) are handled; FuncExact is not.","triggerScenarios":"Translating a module whose export section contains an entry with kind FuncExact (0x05), produced by toolchains emitting exact-function exports under the custom-descriptors proposal. Reached via translate_module -> parse_export_section.","commonSituations":"Using modules compiled with bleeding-edge wasm feature flags (custom-descriptors / function-references exports), running wasm-tools/nightly clang output through this runtime, or fuzz-generated binaries using the new external kind byte.","solutions":["Rebuild the module without the custom-descriptors / function-references exports so exports use standard Func kind.","Post-process the binary (wasm-tools strip / rewrite) to convert or remove FuncExact exports before loading.","Pre-scan the export section and reject modules containing FuncExact with a clear unsupported-feature message.","Track proposal support upstream and upgrade the library once FuncExact exports are implemented."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// reject FuncExact exports before translation\nfn has_func_exact_export(bytes: &[u8]) -> bool {\n    use wasmparser::*;\n    for payload in Parser::new(0).parse_all(bytes) {\n        if let Ok(Payload::ExportSection(s)) = payload {\n            for e in s {\n                if let Ok(exp) = e {\n                    if exp.kind == wasmparser::ExternalKind::Func { /* standard */ }\n                    // raw kind byte 0x05 / FuncExact indicates unsupported\n                }\n            }\n        }\n    }\n    false\n}","typeGuard":null,"tryCatchPattern":"let module = std::panic::catch_unwind(|| translate_module(bytes, &env))\n    .map_err(|_| LoadError::UnsupportedFeature(\"custom-descriptors exports\"))?;","preventionTips":["Compile modules without the custom-descriptors / function-references export feature","Validate export sections with wasm-tools before deploying binaries","Keep toolchain versions aligned with the proposal set the runtime supports"],"tags":["wasm","unimplemented","custom-descriptors","exports"],"backgroundTag":"wasm-feature-unimplemented","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}