Skip to main content

build_headless_app

Function build_headless_app 

Source
pub fn build_headless_app(
    opts: RunOptions,
) -> Result<(App, WindowSetup), RunError>
Expand description

Shared headless plumbing: build_app plus the window-free half of every window backend, WindowCorePlugin (the window messages, the RedrawScheduler, and the extract pipeline). A window backend installs the same plugin when it runs; only the event loop and the renderer bind need a display. Installing it here gives every headless schedule the same resource/system set, so a system that reads window state doesn’t fail validation. Used by run_app_headless (no renderer; FFI/test contract), crate::run_headless::run_app_headless_rendered (full offscreen-render mode), and the golden-image screenshot suite (public/lumenc/tests/golden.rs), which installs an offscreen renderer on top and reads the framebuffer back.