slint-ui/slint · critical
the renderer-software feature must be enabled in…
Error message
the renderer-software feature must be enabled in i-slint-compiler when embedding textures
What it means
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.
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
Example fix
// before (Cargo.toml)
i-slint-compiler = "1.0"
// after
i-slint-compiler = { version = "1.0", features = ["renderer-software"] } Defensive patterns
Strategy: validation
Validate before calling
# build-time guard (build.rs or CI shell) if [ -n "$SLINT_EMBED_TEXTURES" ]; then grep -q 'renderer-software' Cargo.toml || echo "ERROR: enable i-slint-compiler renderer-software feature" && exit 1 fi
Prevention
- 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
When it happens
Trigger: 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"]`.
Common situations: 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.
Related errors
- failed: exited with
- demos.json is incomplete, these boards failed to build
- Error compiling keymap
- home-automation ESP32-P4 failed
- idf.py not found, skipping ESP32-P4 home-automation (needs…
AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-09-16).
Data as JSON: /api/errors/0eebcad3fb810047.
Report an issue: GitHub.
Appendix: source
Thrown at internal/compiler/lib.rs:241
/// The absolute path of the directory the translations are bundled from, if any.
pub fn absolute_bundled_translations_path(&self) -> Option<String> {
#[cfg(feature = "bundle-translations")]
return self.bundled_translations_path.as_ref().map(|path| {
std::path::absolute(path)
.unwrap_or_else(|_| path.clone())
.to_string_lossy()
.into_owned()
});
#[cfg(not(feature = "bundle-translations"))]
return None;
}
pub fn new(output_format: OutputFormat) -> Self {
let embed_resources = if std::env::var_os("SLINT_EMBED_TEXTURES").is_some()
|| std::env::var_os("DEP_MCU_BOARD_SUPPORT_MCU_EMBED_TEXTURES").is_some()
{
#[cfg(not(feature = "renderer-software"))]
panic!(
"the renderer-software feature must be enabled in i-slint-compiler when embedding textures"
);
#[cfg(feature = "renderer-software")]
EmbedResourcesKind::EmbedTextures
} else if let Ok(var) = std::env::var("SLINT_EMBED_RESOURCES") {
let var = var.parse::<bool>().unwrap_or_else(|_|{
panic!("SLINT_EMBED_RESOURCES has incorrect value. Must be either unset, 'true' or 'false'")
});
match var {
true => EmbedResourcesKind::EmbedAllResources,
false => EmbedResourcesKind::OnlyBuiltinResources,
}
} else {
match output_format {
#[cfg(feature = "rust")]
OutputFormat::Rust => EmbedResourcesKind::EmbedAllResources,
OutputFormat::Interpreter => EmbedResourcesKind::Nothing,
_ => EmbedResourcesKind::OnlyBuiltinResources,View on GitHub (pinned to 3a7e700487)