slint-ui/slint · error

SLINT_EMBED_RESOURCES has incorrect value. Must be either un

Error message

SLINT_EMBED_RESOURCES has incorrect value. Must be either unset, 'true' or 'false'

What it means

Error "SLINT_EMBED_RESOURCES has incorrect value. Must be either unset, 'true' or 'false'" thrown in slint-ui/slint.

Source

Thrown at internal/compiler/lib.rs:231

    /// live-reload runtime to indicate that the `.slint` file is being previewed rather than
    /// driven by real host application logic.
    pub is_preview: bool,
}

impl CompilerConfiguration {
    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,
            }
        };

        let inline_all_elements = match std::env::var("SLINT_INLINING") {
            Ok(var) => var.parse::<bool>().unwrap_or_else(|_| {
                panic!(
                    "SLINT_INLINING has incorrect value. Must be either unset, 'true' or 'false'"

View on GitHub (pinned to 3fd8f2ec03)

Solutions

  1. Set SLINT_EMBED_RESOURCES to 'true' or 'false', or unset it.
  2. Check for typos in the environment variable value.

When it happens

Trigger: Thrown at internal/compiler/lib.rs:231 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19). Data as JSON: /api/errors/befd6c1ae50dbaa6. Report an issue: GitHub.