Tessera

A fast, GPU-first Rust UI framework that is declarative and reactive.

cargo install cargo-tessera
Get started

Write a function.Tessera draws the rest.

use tessera_components::{
    alignment::{CrossAxisAlignment, MainAxisAlignment},
    button::button,
    column::column,
    modifier::ModifierExt as _,
    surface::surface,
    text::text,
    theme::material_theme,
};
use tessera_ui::{Dp, Modifier, remember, tessera};

#[tessera]
pub fn app() {
    let count = remember(|| 0i32);

    material_theme().child(move || {
        surface()
            .modifier(Modifier::new().fill_max_size())
            .child(move || {
                column()
                    .modifier(Modifier::new().fill_max_size())
                    .main_axis_alignment(MainAxisAlignment::Center)
                    .cross_axis_alignment(CrossAxisAlignment::Center)
                    .children(move || {
                        text(count.get().to_string()).size(Dp(40.0));
                        button()
                            .filled()
                            .on_click(move || count.with_mut(|c| *c += 1))
                            .child(|| text("Increment"));
                    });
            });
    });
}

How it works

The UI is a Rust function of state. Tessera runs these functions as needed to build each frame, then draws it on the GPU using Vulkan, Metal, DirectX 12 or WebGPU. No HTML, no CSS, no WebView.

Start a project

$ cargo install cargo-tessera
$ cargo tessera new my-app
$ cd my-app && cargo tessera dev

* A chat client built with Tessera, compiled to WebAssembly and drawn with WebGPU. The replies are scripted.

Demo source ↗

Cross-platform

Runs on Windows, macOS, Linux, Android, iOS and the web.

Bring your own shader

Every effect is a pluggable shader, the built-in component library included.

Modern scaffolding

cargo-tessera is all you need, for everything.

Pure Rust

Plain Rust syntax, 0% RSX.