0.15.1

Pre-1.0: minor releases may introduce breaking changes. Pin your tested version. How to pin it →

Get started

Installation, examples, dependencies and optional features.

cargo new my-app
cd my-app
cargo add teksilo

Minor releases may introduce breaking changes. Pin the version you test against and read the release notes before upgrading.

Give your AI the right context

cargo-teksilo gives AI agents factual references for answering questions about Teksilo: versioned APIs, usage patterns, guides and examples. Its search combines keyword and semantic matching to find relevant answers. Results match the Teksilo version resolved in your Cargo.lock.

Install the tool and run setup from your application directory:

cargo install cargo-teksilo
cargo teksilo setup

The tool queries the version resolved in Cargo.lock, so you or your AI assistant can use these commands:

cargo teksilo version                       # tool and resolved framework versions
cargo teksilo symbol Button                 # exact public API
cargo teksilo symbol --crate data ListModel
cargo teksilo search "make a list scrollable"
cargo teksilo show docs/scroll-area.md       # full guide from the matching corpus

Optional setup:

cargo teksilo setup --user                          # user-level instructions
cargo install cargo-teksilo --no-default-features   # lexical search without ONNX

See the agent tooling reference.

A minimal app

use teksilo::prelude::*;
use teksilo::widgets::Button;

fn main() {
    TeksiloAppBuilder::new()
        .theme(intui::light())
        .initial_window(
            WindowConfig::new()
                .title("Hello Teksilo")
                .size(400, 300)
                .root(|tree, _state| {
                    tree.add(
                        Button::new(lit!("Click Me"))
                            .on_activate_fn(|_ctx| println!("Clicked!")),
                    )
                }),
        )
        .run();
}

Use Signal<T> for reactive state and map for derived values:

use teksilo::prelude::*;
use teksilo::widgets::{Button, TextWidget, VStack};

fn main() {
    TeksiloAppBuilder::new()
        .theme(intui::light())
        .initial_window(
            WindowConfig::new()
                .title("Counter")
                .size(300, 150)
                .root(|tree, _state| {
                    let count = Signal::new(0_i32);
                    let label = count.map(|n| format!("Count: {n}"));
                    tree.add(
                        VStack::new()
                            .spacing(12.0)
                            .child(TextWidget::new(lit!("")).text(label))
                            .child(
                                Button::new(lit!("Increment"))
                                    .on_activate_fn(move |_| {
                                        count.set(count.get() + 1)
                                    }),
                            ),
                    )
                }),
        )
        .run();
}

Toolchain and system packages

Use current stable Rust. The workspace uses edition 2024; no minimum supported Rust version is declared. Teksilo focuses on native desktop applications for Linux, Windows and macOS, with CI tests on all three platforms.

On Debian or Ubuntu, install build-essential, pkg-config, libxkbcommon-dev, libwayland-dev, libxcb1-dev and libx11-dev. The optional web-view feature also needs libglib2.0-dev, libgtk-3-dev, libwebkit2gtk-4.1-dev, libsoup-3.0-dev and libjavascriptcoregtk-4.1-dev. Default native file dialogs use xdg-portal and Wayland without GTK.

The standard workspace build needs neither CMake nor a C++ toolchain. The native analytics and telemetry example crates that require them are excluded.

What you get by default

The default feature set of the teksilo crate is widgets, text, i18n, inspector, toast, file-dialog, clipboard, fonts-arabic and fonts-hebrew. That gives you the widget catalog, the rich-text stack, compile-time-checked translations, the F12 debug inspector (debug builds only), toast notifications, native file dialogs and the system clipboard.

Off by default, added when you need them:

Read the examples

Run examples from a repository checkout:

cargo run -p simple-button      # the minimal app
cargo run -p widget-catalog     # browse most of the catalog
cargo run -p data-collections   # lists and trees over the data models
cargo run -p docking            # a dockable editor shell
cargo run -p file-dialogs       # native open, save and pick-folder

widget-catalog takes a --theme flag to start in a specific preset, one of intui-light, intui-dark, material3-light, material3-dark, fluent-light, fluent-dark, macos-light or macos-dark. simple-button is the closest thing in the repository to the first snippet above, with the inspector and the automation bridge added.

cargo run -p teksilo-widgets-previewer opens a three-pane explorer with live property editing, covering 56 of the widgets.

Before you build something on it

Where to go next