Thanks to visit codestin.com
Credit goes to lib.rs

26 releases (11 breaking)

Uses new Rust 2024

0.14.1 May 11, 2026
0.13.3 Apr 17, 2026
0.13.2 Mar 14, 2026
0.8.3 Dec 14, 2025
0.7.1 Nov 18, 2025

#1862 in GUI

LGPL-2.1-or-later

615KB
15K SLoC

Repose

A small, composable UI toolkit in Rust with a Compose-like API, cross-platform runners (desktop/Android/web), and a WGPU renderer.

Crates.io GitHub Pages

Status: pre-1.0. API (mostly minor) might change. A few working apps exist, and there shouldn't be any major issues.

Useful for simple apps (though aiming for bigger ones in the future), and for developers who want a Compose-like experience in Rust without the overhead of embedding a web view or maintaining separate native UI codebases.

Features

  • Declarative UI — Compose-like API with View functions, reactive Signals, and remember for state
  • Cross-platform — Desktop (winit), Android, and WebAssembly
  • Layout — Flexbox and Grid via Taffy
  • Rendering — Rectangles, borders, rounded clips, ellipses, text, images via WGPU
  • Text — Shaping, metrics, and wrapping via cosmic-text with caching
  • Input — Pointer events, scrolling, focus traversal, IME support
  • Widgets — Text, Button, TextField, Checkbox, Switch, Slider, ScrollArea, LazyColumn
  • Navigation — Typed stack navigation with transitions (repose-navigation)
  • Accessibility — AccessKit integration on desktop, semantic node pipeline
  • DevTools — Inspector overlay (Ctrl+Shift+I)

Non-Goals

  • Full feature parity with mature toolkits (prioritising having a minimal and maintainable for 80% of the tasks, until i get enough funding, or after years of usage)

Quick Start

Prerequisites

  • For desktop: system dependencies for WGPU (varies by OS)
  • For web: trunk (cargo install trunk)
  • For Android: Android SDK/NDK and cargo-apk

Run the Showcase

Desktop:

cargo run -p showcase --features desktop-bin

Web:

cd examples/showcase
trunk serve

Or try the hosted demo.

Android:

cd examples/showcase
cargo rapk run --target aarch64-linux-android --lib

Usage

use repose_core::prelude::*;
use repose_ui::*;

fn Counter() -> View {
    let count = remember_state(|| 0);
    
    Column(Modifier::new().padding(16.0)).child((
        Text(format!("Count: {}", *count.borrow())),
        Button("Increment", {
            let count = count.clone();
            move || *count.borrow_mut() += 1
        }),
    ))
}

fn main() -> anyhow::Result<()> {
    repose_platform::run_desktop_app(|_sched, _ctx| Counter())
}

State management:

// Signal for shared/global state
let theme = signal(Theme::default());
theme.set(Theme::dark());

// remember_state for component-local state
let input = remember_state(|| String::new());

// Derived state
let full_name = produce_state("full", {
    let first = first_name.clone();
    let last = last_name.clone();
    move || format!("{} {}", first.get(), last.get())
});

Layout:

Row(Modifier::new().gap(8.0)).child((
    Text("Left"),
    Spacer(),
    Text("Right"),
))

Navigation:

let stack = remember_back_stack(Route::Home);
let navigator = Navigator { stack: (*stack).clone() };

// Push route
navigator.push(Route::Details);

// Pop (back button)
back::set(Some(Rc::new(move || navigator.pop())));

GIF

soredowe ui

Inspiration

Wanted an UI which was short and easy to understand by looking at the code (essentially declaritive, helps balance out rust ig :), similar to Compose, and liked the design of Jetpack Compose too (like Iced, which was, similarly, based on elm-ui)

Architecture

Crate Purpose
repose-core Signals, effects, runtime, view model, locals, animation
repose-ui Widgets, layout (Taffy), paint, hit regions, semantics
repose-render-wgpu WGPU renderer, atlases, pipelines
repose-platform Platform runners (winit desktop / Android / WASM web)
repose-text Text shaping, metrics, wrapping/ellipsis caches
repose-material Material Design-inspired components
repose-navigation Typed stack navigation with transitions
repose-canvas Custom painting surface
repose-devtools Inspector HUD
repose-docking Dockable panels

Projects Using Repose

These were built to test the toolkit in real apps:

Contributing

Issues and PRs are welcome, especially for:

  • Correctness bugs
  • Performance regressions (include a repro)
  • Platform gaps (except external issues like Android IME, if documented)

Development Setup

git clone https://github.com/mlm-games/repose
cd repose
cargo test --workspace

Support

Consider donating if you'd like to support it's development. Open an issue or a discussions for bugs or questions.

Mentions

  • Taffy for layout
  • cosmic-text for text shaping
  • wgpu for cross-platform graphics
  • AccessKit for accessibility
  • Heavily inspired by Jetpack Compose's API design

License

Repose is licensed under the GNU Lesser General Public License, version 2.1 or later (LGPL-2.1-or-later).

See LICENSE for more info.

Dependencies

~33–80MB
~1M SLoC