Skip to main content

Project Structure

Workspace Layout

lui/
├── crates/ # Engine crates (backend-agnostic)
│ ├── lui/ # Façade: orchestration, paint, interactivity
│ ├── lui-parser/ # HTML tokenizer, CSS parser, stylesheet parser
│ ├── lui-style/ # CSS cascade, selector matching, inheritance
│ ├── lui-layout-old/ # Block, flex, grid, IFC, positioned layout
│ ├── lui-text/ # Font DB, cosmic-text shaping, glyph atlas
│ ├── lui-display-list/ # Backend-agnostic display list IR
│ ├── lui-tree/ # DOM tree, events, focus, query selectors
│ ├── lui-events/ # Typed event structs
│ ├── lui-models/ # Shared types (Style, enums, element structs)
│ ├── lui-ui/ # Component framework
│ └── lui-devtools/ # Devtools inspector
├── renderers/ # GPU backend implementations
│ ├── lui-render-api/ # RenderBackend trait + RenderError
│ └── lui-renderer-wgpu/ # wgpu backend (quad, glyph, image pipelines)
├── drivers/ # Platform integrations
│ ├── lui-driver/ # Backend-agnostic Driver + Runtime
│ ├── lui-driver-winit/ # winit window harness
│ ├── lui-driver-egui/ # egui integration
│ └── lui-driver-bevy/ # Bevy plugin
├── demo/ # Demo applications
│ ├── lui-demo/
│ └── lui-demo-bevy/
├── spec/ # Technical specifications
├── www/ # Docusaurus documentation site
│ ├── docs/
│ └── docusaurus.config.js
└── AGENTS.md

Key Source Files

lui (facade)

FilePurpose
src/lib.rsTop-level orchestration: paint_tree, classify_frame, PipelineCache
src/paint.rsDisplayList generation from LayoutBox tree
src/interactivity.rsMouse/keyboard dispatch wrappers, text selection
src/date_picker_overlay.rsDate input overlay UI

lui-layout-old

FilePurpose
src/lib.rsCore layout: layout_block, IFC, positioned, overflow, incremental
src/flex.rsCSS Flexbox Level 1 algorithm
src/grid.rsCSS Grid Layout Level 1 algorithm
src/length.rsCSS length resolution (px, %, em, vw, calc, etc.)
src/table.rsTable layout (in progress)

lui-renderer-wgpu

FilePurpose
src/lib.rsRenderer (implements RenderBackend), wgpu surface setup
src/quad_pipeline.rsSDF rounded quad pipeline
src/glyph_pipeline.rsGlyph atlas text rendering
src/image_pipeline.rsTextured image rendering

Building and Testing

cargo build --workspace
cargo test --workspace
cargo run -p lui-demo

Targeted test loops:

cargo test -p lui-layout-old
cargo test -p lui-parser
cargo test -p lui