EpicGames/lore · error · io::Error

unsupported LORE_IO_BACKEND

Error message

unsupported LORE_IO_BACKEND "{other}" (supported: {SUPPORTED_BACKENDS})

What it means

`backend_kind_from_value` parses the `LORE_IO_BACKEND` environment variable and only accepts ""/"auto", "psync", plus platform-specific "uring" (Linux) or "iocp" (Windows). Any other value yields InvalidInput with the list of backends supported by the current build, so an invalid or platform-unsupported backend name is rejected loudly at driver construction.

Solutions

  1. Set `LORE_IO_BACKEND` to one of the listed supported values: "auto", "psync", "uring" (Linux only), or "iocp" (Windows only); or unset it / set it to "auto" to probe.
  2. Check for typos and surrounding whitespace/case issues in the environment variable (e.g. "io_uring" is not accepted; use "uring").
  3. If you need a platform-specific backend, run on that platform or use a build with the backend's cfg target enabled.

Example fix

// before
export LORE_IO_BACKEND=io_uring
// after
export LORE_IO_BACKEND=uring   # Linux builds only; use "auto" to be platform-neutral
Defensive patterns

Strategy: validation

Validate before calling

// Rust: validate LORE_IO_BACKEND before constructing the driver
fn backend_supported(v: &str) -> bool {
    matches!(
        v.to_ascii_lowercase().as_str(),
        "" | "auto" | "psync" | "uring" | "iocp" // uring: linux-only, iocp: windows-only
    )
}

Try / catch

// Rust
match IoDriver::from_env() {
    Err(e) if e.kind() == std::io::ErrorKind::InvalidInput
        && e.to_string().contains("LORE_IO_BACKEND") =>
    {
        eprintln!("{e}; falling back to default backend");
        IoDriver::new()
    }
    r => r?,
}

Prevention

When it happens

Trigger: Setting `LORE_IO_BACKEND` to a misspelled or nonexistent backend name, or to "iocp" on Linux / "uring" on Windows or another non-Linux, non-Windows platform, then constructing an IoDriver via `from_env`.

Common situations: Copy-pasting `LORE_IO_BACKEND=uring` from a Linux benchmark into a Windows/macOS environment; typos like "io_uring", "IOCP", or "psync " with trailing whitespace (note the value is lowercased but not trimmed for unknown names — actually `to_ascii_lowercase` keeps whitespace, so " psync" fails); CI images where the build feature for the backend is disabled.

Understand the failure class

Background: "is not a valid" / "Invalid ... value" environment variable errors: how libraries validate env vars and what to do when they reject yours — this error's family across 48 libraries.

Related errors


AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13). Data as JSON: /api/errors/0e8a4e0dc95062ff. Report an issue: GitHub.

Appendix: source

Thrown at lore-io/src/driver.rs:137

/// nor the completion port's has been profiled under the suite's access pattern.
/// [`BackendKind::Uring`], [`BackendKind::Iocp`] and `LORE_IO_BACKEND` select them explicitly, which
/// is how that investigation gets its A/B without a code change. `lore-io/BENCHMARKS.md` has the
/// per-case numbers.
fn probe() -> DriverInner {
    DriverInner::Psync(PsyncDriver)
}

/// Parses a `LORE_IO_BACKEND` value. Separate from reading the variable so the accepted set and
/// the error are testable without a process-global environment.
fn backend_kind_from_value(value: &str) -> std::io::Result<BackendKind> {
    match value.to_ascii_lowercase().as_str() {
        "" | "auto" => Ok(BackendKind::Auto),
        "psync" => Ok(BackendKind::Psync),
        #[cfg(target_os = "linux")]
        "uring" => Ok(BackendKind::Uring),
        #[cfg(target_family = "windows")]
        "iocp" => Ok(BackendKind::Iocp),
        other => Err(std::io::Error::new(
            std::io::ErrorKind::InvalidInput,
            format!("unsupported LORE_IO_BACKEND \"{other}\" (supported: {SUPPORTED_BACKENDS})"),
        )),
    }
}

/// A file I/O driver instance dispatching to one backend.
///
/// Cloning is cheap and clones share the backend. Most code uses
/// [`IoDriver::global`]; tests and benchmarks construct instances per
/// backend.
#[derive(Clone)]
pub struct IoDriver {
    inner: Arc<DriverInner>,
}

impl std::fmt::Debug for IoDriver {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

View on GitHub (pinned to 074eb0b0d1)