Expand description
§(raclettui)
!! STILL UNDER DEVELOPMENT BUT USABLE !!
A lightweight Wayland layer shell window abstraction implementing the ratatui backend to make terminal style windows. CPU-based and GPU-based (wgpu) rendering backends.
This crate provides:
- A high-level
WindowBuilderAPI for constructing Wayland layer shell windows - CPU rendering via
CpuWindow - GPU rendering via
WgpuWindow - Re-exported Wayland layer-shell enums for convenience
§Backends
The crate supports two rendering backends:
- CPU backend — software rendering using shared memory buffers.
- WGPU backend — hardware-accelerated rendering using
wgpu.
§Layer Shell Support
This crate integrates with the wlr-layer-shell protocol,
allowing creation of desktop components such as:
- Panels
- Overlays
- Lock screens
- Background surfaces
The following types are re-exported for convenience to initialise windows:
§Example
use raclettui::{WindowBuilder, Layer, Anchor};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let window = WindowBuilder::new()
.set_layer(Layer::Top)
.set_anchors(vec![Anchor::Top, Anchor::Left, Anchor::Right])
.init_cpu()?; // for cpu rendering backend
//.init_wgpu()?; for gpu rendering backend
Ok(())
}§Modules
builder— Window construction utilities- [
cpu] — CPU-based rendering backend - [
wgpu] — GPU-based rendering backend events— Event handling types
§Requirements
- Wayland compositor
wlr-layer-shellprotocol support (for layer surfaces)
§Error Handling
All fallible operations return Error.
Re-exports§
pub use builder::WindowBuilder;
Modules§
Structs§
Enums§
- Error
- Keyboard
Interactivity - types of keyboard interaction possible for a layer shell surface
- Layer
- available layers for surfaces