{"record":{"id":"0eebcad3fb810047","repo":"slint-ui/slint","slug":"the-renderer-software-feature-must-be-enabled-in-i","errorCode":null,"errorMessage":"the renderer-software feature must be enabled in i-slint-compiler when embedding textures","messagePattern":"the renderer-software feature must be enabled in i-slint-compiler when embedding textures","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/compiler/lib.rs","lineNumber":241,"sourceCode":"    /// The absolute path of the directory the translations are bundled from, if any.\n    pub fn absolute_bundled_translations_path(&self) -> Option<String> {\n        #[cfg(feature = \"bundle-translations\")]\n        return self.bundled_translations_path.as_ref().map(|path| {\n            std::path::absolute(path)\n                .unwrap_or_else(|_| path.clone())\n                .to_string_lossy()\n                .into_owned()\n        });\n        #[cfg(not(feature = \"bundle-translations\"))]\n        return None;\n    }\n\n    pub fn new(output_format: OutputFormat) -> Self {\n        let embed_resources = if std::env::var_os(\"SLINT_EMBED_TEXTURES\").is_some()\n            || std::env::var_os(\"DEP_MCU_BOARD_SUPPORT_MCU_EMBED_TEXTURES\").is_some()\n        {\n            #[cfg(not(feature = \"renderer-software\"))]\n            panic!(\n                \"the renderer-software feature must be enabled in i-slint-compiler when embedding textures\"\n            );\n            #[cfg(feature = \"renderer-software\")]\n            EmbedResourcesKind::EmbedTextures\n        } else if let Ok(var) = std::env::var(\"SLINT_EMBED_RESOURCES\") {\n            let var = var.parse::<bool>().unwrap_or_else(|_|{\n                panic!(\"SLINT_EMBED_RESOURCES has incorrect value. Must be either unset, 'true' or 'false'\")\n            });\n            match var {\n                true => EmbedResourcesKind::EmbedAllResources,\n                false => EmbedResourcesKind::OnlyBuiltinResources,\n            }\n        } else {\n            match output_format {\n                #[cfg(feature = \"rust\")]\n                OutputFormat::Rust => EmbedResourcesKind::EmbedAllResources,\n                OutputFormat::Interpreter => EmbedResourcesKind::Nothing,\n                _ => EmbedResourcesKind::OnlyBuiltinResources,","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/compiler/lib.rs#L223-L259","documentation":"CompilerConfiguration::new panics at compile time of the consuming build when texture embedding is requested (via SLINT_EMBED_TEXTURES or DEP_MCU_BOARD_SUPPORT_MCU_EMBED_TEXTURES) but the `renderer-software` feature is not enabled on i-slint-compiler. Embedded textures are only supported by the software renderer, so this configuration is invalid.","triggerScenarios":"Building firmware/embedded projects with SLINT_EMBED_TEXTURES set (or the mcu-board-support dep requesting embedded textures) while i-slint-compiler was built without `features = [\"renderer-software\"]`.","commonSituations":"Embedded (MCU) builds using the pico/stm32 board support crates; cargo build of an embedded demo where the compiler feature flags were trimmed or never added.","solutions":["Enable the renderer-software feature on i-slint-compiler in Cargo.toml: `i-slint-compiler = { version = \"...\", features = [\"renderer-software\"] }`","If you don't need embedded textures, unset the SLINT_EMBED_TEXTURES env var and remove DEP_MCU_BOARD_SUPPORT_MCU_EMBED_TEXTURES-triggering dependency features","Use an existing embedded demo template (e.g. mcu-board-support setup) that already enables the correct feature combination"],"exampleFix":"// before (Cargo.toml)\ni-slint-compiler = \"1.0\"\n// after\ni-slint-compiler = { version = \"1.0\", features = [\"renderer-software\"] }","handlingStrategy":"validation","validationCode":"# build-time guard (build.rs or CI shell)\nif [ -n \"$SLINT_EMBED_TEXTURES\" ]; then\n  grep -q 'renderer-software' Cargo.toml || echo \"ERROR: enable i-slint-compiler renderer-software feature\" && exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable renderer-software on i-slint-compiler for any embedded build up front","Keep env-var setup and Cargo features paired in build scripts/templates","Document required features next to SLINT_EMBED_TEXTURES usage"],"tags":["build","embedded","features","env-var"],"backgroundTag":"feature-not-enabled","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}