{"record":{"id":"460105ed4d180189","repo":"wasmerio/wasmer","slug":"the-compiler-compiler-is-not-included-in-this","errorCode":null,"errorMessage":"The `{compiler}` compiler is not included in this binary.","messagePattern":"The `(.+?)` compiler is not included in this binary\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"lib/cli/src/backend.rs","lineNumber":538,"sourceCode":"                    config.enable_verifier();\n                }\n                if self.enable_nan_canonicalization {\n                    config.canonicalize_nans(true);\n                }\n                if let Some(p) = &self.profiler {\n                    match p {\n                        Profiler::Perfmap => config.enable_perfmap(),\n                        Profiler::Gdb => config.enable_debugger(Debugger::Gdb),\n                        Profiler::Lldb => config.enable_debugger(Debugger::Lldb),\n                    }\n                }\n\n                Box::new(config)\n            }\n            BackendType::V8 => unreachable!(),\n            #[cfg(not(all(feature = \"singlepass\", feature = \"cranelift\", feature = \"llvm\")))]\n            compiler => {\n                bail!(\"The `{compiler}` compiler is not included in this binary.\")\n            }\n        };\n\n        #[allow(unreachable_code)]\n        {\n            let mut compiler_config = compiler_config;\n            if self.experimental_artifact {\n                compiler_config.experimental_artifact(true);\n            }\n            Ok(compiler_config)\n        }\n    }\n}\n\n/// The compiler used for the store\n#[derive(Debug, PartialEq, Eq, Clone, Copy)]\n#[allow(clippy::upper_case_acronyms, dead_code)]\npub enum BackendType {","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/backend.rs#L520-L556","documentation":"Wasmer binaries are built with a subset of compilers via cargo features. When get_sys_compiler_config matches a BackendType whose compiler was not compiled into this binary (cfg(not(all(singlepass, cranelift, llvm)))) it bails with the compiler name. This is a compile-feature availability error, not a code bug.","triggerScenarios":"Selecting e.g. BackendType::LLVM (via --llvm) on a binary built without the `llvm` feature; any backend arm other than V8 when not all three compiler features are enabled.","commonSituations":"Minimal `wasmer` builds with only cranelift; distro-packaged binaries with trimmed features; switching backend flags in scripts without checking the installed binary's features.","solutions":["Install/rebuild Wasmer with the needed compiler feature (e.g. --features llvm)","Choose a backend that is included in this binary (e.g. --cranelift on a cranelift-only build)","Check available compilers with `wasmer compile --help` / binary feature info before scripting"],"exampleFix":"// before\ncargo install wasmer --no-default-features --features cranelift\nwasmer run app.wasm --llvm\n// after\ncargo install wasmer --features cranelift,llvm\nwasmer run app.wasm --llvm","handlingStrategy":"validation","validationCode":"// probe feature availability before selecting a backend\n#[cfg(not(feature = \"llvm\"))]\ncompile_error!(\"this build lacks the llvm compiler; rebuild with --features llvm\");","typeGuard":"fn backend_available(rt: &BackendType) -> bool {\n    match rt {\n        #[cfg(feature = \"singlepass\")]\n        BackendType::Singlepass => true,\n        #[cfg(feature = \"cranelift\")]\n        BackendType::Cranelift => true,\n        #[cfg(feature = \"llvm\")]\n        BackendType::LLVM => true,\n        _ => false,\n    }\n}","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"is not included in this binary\") => {\n        eprintln!(\"{}\", e); // user must reinstall with the right features\n        Err(e)\n    }\n    other => other?,\n}","preventionTips":["Check the binary's compiled-in features before scripting backend flags","Install wasmer with all compiler features in shared environments","Document required cargo features wherever a specific backend is mandated"],"tags":["cli","backend","compiler","build-features","config"],"backgroundTag":"compiler-not-compiled-in","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}