Get started
Installation, examples, dependencies and optional features.
cargo new my-app
cd my-app
cargo add teksiloMinor 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 initialize it from your application directory:
cargo install cargo-teksilo
cargo teksilo initinit installs the automation probe harness and instructions for the agents it detects, after a short confirmation. You or your AI assistant can then use these commands:
cargo teksilo symbol Button # exact public API
cargo teksilo symbol --crate data ListModel
cargo teksilo search "make a list scrollable"
cargo teksilo search "scrolling history" --path docs/charts.md
cargo teksilo show docs/scroll-area.md # full guide from the matching corpus
cargo teksilo status # resolved app version and installed tooling
cargo teksilo --version # tool versionChoosing agents and enabling semantic search:
cargo teksilo init --agent codex --agent claude -y # select agents, skip the prompt
cargo teksilo agent install cursor cline # instructions only, no harness
cargo teksilo agent install claude --user # user-level instructions
cargo teksilo agent list # supported agents and their state
cargo teksilo model fetch # download the semantic search model
cargo install cargo-teksilo --no-default-features # lexical search without ONNXSupported agents are claude, cursor, windsurf, cline, copilot, codex, vibe and opencode. Nothing downloads the search model implicitly: until model fetch has cached it, search uses keyword matching only. A patch difference between the tool and your application produces a note; a minor mismatch is refused.
See the agent tooling reference, which also maps the removed setup and version commands to their replacements.
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();
}- Import widgets separately from the prelude with
teksilo::widgets::{...}. lit!requires the defaulti18nfeature. Disabling default features removeslit!,tr!andLocalizedStringunless you re-enablei18n.- Set the title and size on
WindowConfig. Itsrootclosure receives the widget tree and window state, and returns the root widget’s ID.
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:
- Theme presets.
theme-material3,theme-fluentandtheme-macos. The Int UI light and dark themes are in the core and need no feature. - Font bundles. The default set bundles Noto Sans for Arabic and Hebrew.
fonts-thai,fonts-devanagari,fonts-cjk-sc,fonts-cjk-jpandfonts-cjk-kradd the other scripts one at a time,fonts-alladds every one, andsystem-emojiloads a color emoji font from the machine at startup. - Async.
asyncfor the opt-in main-thread executor, plustokioorasync-stdfor a reactor when you want to await native runtime futures. web-view. The embedded web view, wry by default. It is a prototype, and the Servo backend (the native Wayland path) renders pages inside the window and supports pointer, touch, wheel and keyboard input.terminal. The terminal widget, over a real PTY.telemetryandautomation. The opt-in analytics stack, and the debug-only bridge that lets an agent drive a running application.
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-folderwidget-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
- CJK IME composition is untested by real users. Latin and bidirectional input compose correctly; Chinese, Japanese and Korean input methods need testing by people who use them daily.
- X11 verification breadth is limited. The X11 title bar and drag-and-drop backends ship with protocol tests, but live verification has been against KWin through XWayland, plus Openbox in CI. Other window managers are untested.
Where to go next
- Tour: features and limitations.
- Documentation index: guides and API reference.
- Contributing: checkout setup and required checks.