{"record":{"id":"a18a1aa107fcb203","repo":"wasmerio/wasmer","slug":"the-backend-does-not-support-the-required-featu","errorCode":null,"errorMessage":"The {} backend does not support the required features for the Wasm module{}","messagePattern":"The (.+?) backend does not support the required features for the Wasm module(.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"lib/cli/src/backend.rs","lineNumber":322,"sourceCode":"        required_features: &Features,\n        target: &Target,\n    ) -> Result<Engine> {\n        let backends = self.get_available_backends()?;\n        let filtered_backends =\n            Self::filter_backends_by_features(backends.clone(), required_features, target);\n\n        if filtered_backends.is_empty() {\n            let enabled_backends = BackendType::enabled();\n            if backends.len() == 1 && enabled_backends.len() > 1 {\n                // If the user has chosen an specific backend, we can suggest to use another one\n                let filtered_backends =\n                    Self::filter_backends_by_features(enabled_backends, required_features, target);\n                let extra_text: String = if !filtered_backends.is_empty() {\n                    format!(\". You can use --{} instead\", filtered_backends[0])\n                } else {\n                    \"\".to_string()\n                };\n                bail!(\n                    \"The {} backend does not support the required features for the Wasm module{}\",\n                    backends[0],\n                    extra_text\n                );\n            } else {\n                bail!(\n                    \"No backends support the required features for the Wasm module. Feel free to open an issue at https://github.com/wasmerio/wasmer/issues\"\n                );\n            }\n        }\n        filtered_backends.first().unwrap().get_engine(target, self)\n    }\n\n    #[cfg(feature = \"compiler\")]\n    /// Get the enabled Wasm features.\n    pub fn get_features(&self, default_features: &Features) -> Result<Features> {\n        if self.features.all {\n            return Ok(Features::all());","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/backend.rs#L304-L340","documentation":"get_engine_for_features determines which compiled backends can satisfy the Wasm features the module requires. If some backends remain after filtering by required features but the first (selected) backend cannot support them, it bails telling you the current backend is insufficient and suggesting an alternative backend via the formatted hint suffix.","triggerScenarios":"Calling get_engine_for_module/get_engine_for_features with a module that uses features (e.g. threads, simd, reference types) unsupported by the configured backend while another installed backend does support them.","commonSituations":"Running a module needing LLVM-only features with the Singlepass/Cranelift backend selected; defaulting to a backend that lacks a newly used proposal; headless binary with restricted backend feature sets.","solutions":["Switch to the backend suggested in the error message (the `You can use --<backend> instead` hint), e.g. pass --llvm","Enable the missing feature in the selected backend's compiler config if supported","Compile/re-export the module without the unsupported features"],"exampleFix":"// before\nwasmer run app.wasm            # defaults to cranelift, needs llvm features\n// after\nwasmer run app.wasm --llvm     # use the suggested backend","handlingStrategy":"fallback","validationCode":"let required = module.features();\nlet supported = BackendType::all().filter(|b| b.supports_features(&required));\nif !supported.contains(&selected_backend) {\n    eprintln!(\"switch to {:?}\", supported.first());\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"does not support the required features\") => {\n        let alt = extract_suggested_backend(&e.to_string());\n        retry_with_backend(alt)\n    }\n    other => other?,\n}","preventionTips":["Inspect the module's required features before choosing a backend","Parse and honor the `You can use --<backend> instead` hint in the message","Standardize on the most feature-complete backend (LLVM) for feature-heavy modules"],"tags":["cli","backend","wasm-features","compiler","config"],"backgroundTag":"unsupported-backend-feature","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}