telar-reactive-core 0.1.2

Fine-grained reactive graph for Telar: signals, memos, effects and batching.
Documentation

Telar

CI crates.io docs.rs license

A modular Rust UI framework with its own template language, reactive signals and a self-contained renderer.

Telar draws every pixel itself — there is no webview and no native widget toolkit underneath. Components are written in .rsx, an indentation-based template language that compiles to plain Rust at build time, so what ships is a single binary with no runtime interpreter.

Early days. Telar is at 0.1.2. The APIs work and are exercised by the apps in this repo, but they will keep moving before 1.0.

A component

[logic]
#[derive(Default)]
pub struct Props {
    pub icon: &'static str,
    pub title: &'static str,
    pub body: &'static str,
}

[view]
box fill:surface stroke:border radius:16 width:300 pad:24 gap:10 direction:col
    text "{props.icon}" size:32
    text "{props.title}" size:18 color:dark
    text "{props.body}" size:14 color:muted

[preview "Fast"]
feature_card icon:"⚡" title:"Fast" body:"Software and wgpu renderers with dirty tracking."

A .rsx file has up to four sections: [logic] for verbatim Rust (a pub struct Props declares the component's props), [style] for constants and reusable style classes, [view] for the node tree, and [preview] blocks that the tooling can render in isolation.

Getting started

cargo install cargo-telar
cargo add telar

Add a telar.toml next to your Cargo.toml:

[telar]
backend = "auto"
auto_modules = true

[telar.dev.window]
title = "my-app"
width = 1200
height = 800

Declare the app in src/lib.rstelar::app! wires the theme, the startup hook, the window config and the root component:

telar::app!(
    theme::MyTheme,
    { telar::set_theme(theme::MyTheme::light()); },
    telar::AppConfig::default(),
    app::Root
);

Then:

cargo telar dev        # run with hot reload
cargo telar preview    # render every [preview] block, hot-reloaded
cargo telar test       # render all previews headlessly and report failures
cargo telar build --format deb   # appimage | deb | dmg | nsis | apk | dir
cargo telar doctor     # check the toolchain

apps/sandbox in this repo is the reference app and covers most of the surface. (cargo telar new is stubbed out and not implemented yet.)

What's in the box

  • Reactive signals — a fine-grained graph of signals, memos and effects; no virtual DOM, no diffing.
  • Two renderers — a CPU rasterizer on tiny-skia and a GPU one on wgpu, both behind the same drawing vocabulary, selected by backend = "auto" | "hardware" | "software".
  • Flexbox and grid layout on top of Taffy, with reactive writing direction (LTR/RTL).
  • Motion — tweens and springs driven by one frame ticker, with colors interpolated in Oklch.
  • Theming — theme tokens plus light/dark mode that can follow the OS.
  • Internationalization — translation catalogs baked at build time; t! validates keys and arguments at compile time.
  • Navigation — a reactive page stack with animated transitions.
  • Hot reload in cargo telar dev, and an in-app devtools overlay for inspecting the live component tree.
  • Packaging to native installers per platform, plus Android APKs.

Targets desktop (Linux, macOS, Windows) and Android.

Editor support

The VS Code extension provides syntax highlighting, snippets, diagnostics, completion and component preview, backed by the telar-analyzer language server. The extension bundles a prebuilt server binary, so no extra install step is needed.

Crates

Everything is published under the telar- prefix. Most users only need the telar facade, which re-exports the runtime behind feature flags.

Crate Purpose
telar The facade: re-exports the runtime and the app!/t! macros
cargo-telar cargo telar — dev server, previews, packaging
telar-reactive-core Signals, memos, effects, batching
telar-geometry-core Points, rects, transforms, border radii, Oklch color
telar-layout-core · telar-layout-reactive Flexbox/grid engine and its reactive context
telar-motion-core Tweens, springs, the frame ticker
telar-theme-core Theme tokens, light/dark mode
telar-ui-core · telar-ui-tree · telar-ui-components Widget kernel, component tree, widget catalogue
telar-renderer-core Draw commands, culling, dirty tracking
telar-renderer-software · telar-renderer-hardware CPU and wgpu backends
telar-renderer-text · telar-renderer-assets Text shaping and glyph atlas; SVG/PNG/JPEG decoding
telar-platform-core and telar-platform-{winit,desktop,android,headless} Window/event abstraction and its backends
telar-parser · telar-transpiler · telar-macros The .rsx pipeline
telar-i18n-core · telar-navigate-core · telar-services-core i18n runtime, navigation, platform paths and DI
telar-devtools · telar-devtools-core · telar-diagnostics · telar-workspace Devtools overlay and shared tooling

telar-analyzer lives in this repo but is distributed as a binary through GitHub Releases and the VS Code extension rather than crates.io.

Minimum supported Rust version

Rust 1.89. Bumping it is a minor-version change.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.