A high-performance, cross-platform UI framework with direct-to-GPU rendering, written in Rust 🦀
Project status: pre-alpha — design phase. Byard is currently a set of design documents and an architectural plan. There is no usable build yet. The public interface, the
byldDSL syntax, and the crate layout are all expected to change. This README describes the intended system; see the RFCs for the authoritative design.
Byard is a UI framework built around a single idea: the declarative layer and the systems layer should never live in the same file.
byld— a statically-typed DSL used exclusively to declare UI structure, styling, and visual reactivity.- Rust — used exclusively for business logic: networking, disk, cryptography, OS integration, and anything that touches the real world.
The two communicate through compile-time-generated, zero-cost bindings. There is no IPC, no serialization boundary, and no runtime glue.
Byard renders directly to the GPU through wgpu,
lays out with taffy, and rasterizes text
with glyphon. It has no garbage
collector: memory is owned by component-scoped arenas that are released in a
single O(1) operation when a view is unmounted.
Existing UI stacks each carry a structural cost Byard is designed to avoid:
| Ecosystem | Strength | Cost Byard rejects |
|---|---|---|
| Web / DOM | Universal reach | A document model forced to be interactive — heavy RAM and CPU use |
| Flutter / Dart | Excellent cross-platform story | Verbosity and deep "wrapper hell" widget trees |
| Pure Rust UI | Memory safety, real concurrency | A hostile developer experience fighting the borrow checker for layout |
Byard's goal is the ergonomics and readability of React/SwiftUI with the memory safety, concurrency, and low-level control of Rust — and deterministic performance: stable frame times, no GC pauses, no VRAM spikes.
- Strict domain separation.
byldis for design; Rust is for logic. They are never mixed in one file. - Zero garbage collector. Memory is managed through Rust ownership and component-scoped memory arenas.
- Deterministic, raw performance. If it does not hold a stable frame rate, or it spikes VRAM, the architecture has failed. Asynchronous hardware acceleration is preferred over CPU-side logic.
- No raw math in the view. The declarative layer exposes organic concepts — views, signals, environments — never graphs, pointers, or Z-indices.
The engine is four concurrent subsystems:
- Logic subsystem — interprets state (
Signals) and owns the per-view memory arenas. - Spatial subsystem — topological layout via Taffy plus a parallel spatial hash
grid for
O(1)hit-testing, fully decoupled from the UI tree. - Render subsystem — a multi-pipeline
wgpucommand dispatcher (no über-shader). - Concurrency subsystem — thread management, double-buffered visual state, and a Tokio pool for async I/O.
The full design — memory model, the multi-pipeline renderer, the spatial hit-testing
grid, the threading model, and the byld compiler pipeline — is specified in
RFC-0001: Core Architecture.
// Conceptual byld — syntax is not final.
View UserCard() {
signal clicks = 0
inject AppEnvironment as env
Column(gap: 12, bg: env.theme.surface, radius: 16, p: 20) {
Text("Clicks: {clicks}", typo: m3.titleLarge)
Button("Action", onClick: () => clicks++)
}
}
Wrapper components (Padding, Align, …) are intentionally absent — spatial and
decorative properties are passed as arguments to the base component.
Byard is being built in phases.
- Phase 0 — Design (complete) — RFCs, architecture, crate layout.
- Phase 1 — Engine core (current) —
wgpumulti-pipeline renderer, Taffy integration, the spatial hash grid, and the double-buffered threading model. Scope and progress tracked in the Phase 1 milestone. - Phase 2 —
byldcompiler —logoslexer, hand-written recursive descent parser, and the dev-mode AST interpreter. - Phase 3 — Rust ↔
byldbridge — the#[byard_controller]macro and LSP metadata generation. - Phase 4 — Production transpiler —
byld→ native Rust for AOT builds.
Roadmap items will be tracked as GitHub milestones as the project moves out of the design phase.
Byard is open to contributions from day one. The
Phase 1 milestone tracks the
current implementation work — look for issues labelled phase-1 and
good first issue to get started.
Please read CONTRIBUTING.md and the Code of Conduct before opening an issue or pull request.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.
Made with love for the Rust community. For those who believe UI deserves the same rigor as systems code.