Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Welcome to Horizon Lattice, a Rust-native GUI framework inspired by Qt6’s comprehensive design philosophy.

What is Horizon Lattice?

Horizon Lattice is a cross-platform GUI toolkit built from the ground up in Rust. It takes Qt’s proven concepts—signals/slots, declarative UI, comprehensive widget set, cross-platform support—and implements them idiomatically using Rust’s ownership model and safety guarantees.

Why Horizon Lattice?

Pure Rust, No C++ Dependencies

Unlike Qt bindings, Horizon Lattice is written entirely in Rust. This means:

  • No external MOC tool required
  • Compile-time type checking for signals and slots
  • Memory safety guaranteed by the Rust compiler
  • Easy integration with the Rust ecosystem

Qt-Inspired, Rust-Idiomatic

We’ve adopted Qt’s battle-tested design patterns while making them feel natural in Rust:

FeatureQtHorizon Lattice
Code generationExternal MOC toolRust proc-macros
Signal type safetyRuntimeCompile-time
Memory managementManual + parent-childRust ownership
LicenseLGPL/CommercialMIT/Apache 2.0

Modern Graphics

Horizon Lattice uses modern graphics APIs through wgpu:

  • Vulkan, Metal, DX12, and WebGPU backends
  • GPU-accelerated 2D rendering
  • Efficient damage tracking for minimal redraws

Quick Example

use horizon_lattice::prelude::*;

fn main() -> Result<(), horizon_lattice::LatticeError> {
    let app = Application::new()?;

    let mut window = Window::new("Hello, Horizon Lattice!")
        .with_size(400.0, 300.0);

    let button = PushButton::new("Click me!");
    button.clicked().connect(|_checked| {
        println!("Button clicked!");
    });

    window.set_content_widget(button.object_id());
    window.show();

    app.run()
}

Getting Help

License

Horizon Lattice is dual-licensed under MIT and Apache 2.0. You may use it under either license.