{"record":{"id":"3ba3cf5dcad9e21a","repo":"wasmerio/wasmer","slug":"64bit-memory-not-implemented-yet","errorCode":null,"errorMessage":"64bit memory not implemented yet","messagePattern":"64bit memory not implemented yet","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler/src/translator/sections.rs","lineNumber":154,"sourceCode":"                )?;\n            }\n            TypeRef::FuncExact(_) => {\n                return Err(WasmError::Generic(\n                    \"custom-descriptors not implemented yet\".to_string(),\n                ));\n            }\n            TypeRef::Tag(t) => {\n                environ.declare_tag_import(t, module_name, field_name)?;\n            }\n            TypeRef::Memory(WPMemoryType {\n                shared,\n                memory64,\n                initial,\n                maximum,\n                ..\n            }) => {\n                if memory64 {\n                    unimplemented!(\"64bit memory not implemented yet\");\n                }\n                environ.declare_memory_import(\n                    MemoryType {\n                        minimum: Pages(initial as u32),\n                        maximum: maximum.map(|p| Pages(p as u32)),\n                        shared,\n                    },\n                    module_name,\n                    field_name,\n                )?;\n            }\n            TypeRef::Global(ref ty) => {\n                environ.declare_global_import(\n                    GlobalType {\n                        ty: wptype_to_type(ty.content_type)?,\n                        mutability: ty.mutable.into(),\n                    },\n                    module_name,","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler/src/translator/sections.rs#L136-L172","documentation":"The wasm-to-IR translator refuses to translate modules that import a WebAssembly memory with the memory64 flag (64-bit index memory, per the memory64 proposal). In parse_import_section, once a MemoryType with memory64=true is encountered, an explicit unimplemented! panic aborts translation instead of producing incorrect Pages(u32) limits. The library only supports 32-bit memories (Pages wraps a u32).","triggerScenarios":"Translating a module whose import section declares a memory import with the 64-bit flag set (wat: (import ... (memory i64 1)) or memory64 attribute; binary: limits flag bit 0x04 set). Reached via translate_module -> parse_import_section.","commonSituations":"Compiling Wasm built with toolchains that enable the memory64 proposal (e.g. clang/LLVM -mmemory64, wasm-tools emitting memory64), experimenting with proposal features in wat text, or a library update introducing memory64 modules from third parties.","solutions":["Rebuild the Wasm module without the memory64 feature (e.g. drop -mmemory64 / use i32 memory limits) so the import is a standard 32-bit memory.","Change the module to avoid importing 64-bit memory; use linear-memory or shared-buffer shims instead.","Disallow such modules up front: validate imports before calling translate_module and reject any memory64 import with a clear error.","Track/upstream support for the memory64 proposal in the compiler and upgrade once implemented."],"exampleFix":"// before (wasm feature flags in build)\nclang --target=wasm64 -mmemory64 ...   // emits memory64 import\n\n// after\nclang --target=wasm32 ...              // standard 32-bit memory import","handlingStrategy":"validation","validationCode":"// reject modules importing memory64 before translation\nfn has_memory64_import(m: &wasmparser::Module) -> bool {\n    use wasmparser::*;\n    for payload in Parser::new(0).parse_all(&m.bytes) {\n        if let Ok(Payload::ImportSection(s)) = payload {\n            for imp in s {\n                if let Ok(Import { ty: Type::Memory(mt), .. }) = imp {\n                    if mt.memory64 { return true; }\n                }\n            }\n        }\n    }\n    false\n}\nif has_memory64_import(&module) { return Err(\"memory64 imports unsupported\"); }","typeGuard":null,"tryCatchPattern":"// keep translate_module behind a catch_unwind and map panics to load errors\nlet result = std::panic::catch_unwind(|| translate_module(&binary, &mut environ));\nlet module = result.unwrap_or_else(|_| return Err(LoadError::UnsupportedFeature));","preventionTips":["Pin wasm feature flags in the toolchain (no memory64) for modules consumed by this runtime","Add a CI check that validates all shipped wasm binaries for memory64 imports","Reject unknown/unsupported proposal features at module load time with clear errors"],"tags":["wasm","unimplemented","memory64","translator"],"backgroundTag":"wasm-feature-unimplemented","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}