Headless
How headless drivers provide screen and audio interfaces without a window.
The Platforms drivers_headless crate provides screen and audio implementations for native host platforms without a display window.
Context
Section titled “Context”A runtime can supply these implementations where Xila expects graphics or audio interfaces, without displaying a window.
How it works
Section titled “How it works”The screen character device tracks a drawing area and resolution. It validates pixel writes and accepts valid data without displaying it. The audio output reads available whole frames from the audio system into caller-provided storage.
Design choices and trade-offs
Section titled “Design choices and trade-offs”The screen does not retain a framebuffer. Its read operation is unsupported, and it reports that it has not resized. The audio reader rejects a buffer whose size is not a whole number of frames.
Limits
Section titled “Limits”The crate is restricted to Linux, macOS, and Windows targets.
API reference
Section titled “API reference”-
: Driver crate source.drivers_headlesscrate subsystems/graphics/src/headless_screen.rs: Screen implementation (in Core).drivers/headless/src/audio.rs: Audio output.