Whisker: one Rust runtime, native views
Rust decides the layout. UIKit, Android views, WinUI and GTK draw it.
Whisker builds iOS, Android, desktop and web apps from one Rust crate, and it draws them with each platform's own views. The repository opened on 13 May 2026, the first crates.io release followed the next day, and by 13 November there had been 63 releases, the latest 0.18.1. Almost all of its roughly 1,400 commits are by one author, itome. The app is a library: #[whisker::main] marks the root, and whisker run ios (or android, web, macos) generates the native project around it. This is the counter from its README.
pub mod list;
use whisker::prelude::*;
#[whisker::main]
fn app() -> Element {
render! {
Counter
}
}
#[component]
fn counter() -> Element {
let count = signal(0);
render! {
View(style: css!(
flex_grow: 1.0,
display: Display::Flex,
flex_direction: FlexDirection::Column,
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
gap: px(12),
background_color: Color::hex(0x0B0B0F),
)) {
Text(
value: computed(move || format!("Count: {}", count.get())),
style: css!(color: Color::hex(0xFFFFFF), font_size: px(28)),
)
View(
style: css!(
padding: (px(10), px(20)),
border_radius: px(10),
background_color: Color::hex(0x7C5CFF),
),
on_tap: move |_| count.set(count.get() + 1),
) {
Text(value: "+1", style: css!(color: Color::hex(0xFFFFFF)))
}
}
}
} The model is Leptos-shaped: signal and computed are fine-grained, and there is no virtual DOM. A tap that changes count re-runs only the computed that formats the label. Styles are typed Rust rather than CSS strings: css! is a macro over the same Css builder used directly below, and the property names follow CSS flexbox because they compile to Taffy styles.
//! A keyed, virtualised list. Tapping a chip filters it; only the rows whose
//! keys change are created or released.
use whisker::prelude::*;
const LAYERS: [&str; 4] = ["All", "Windowing", "Rendering", "Layout"];
const CRATES: [(&str, usize); 6] =
[("winit", 1), ("glutin", 1), ("wgpu", 2), ("vello", 2), ("taffy", 3), ("morphorm", 3)];
#[component]
pub fn crate_list() -> Element {
let layer = signal(0usize);
render! {
View(style: Css::new().flex_grow(1.0).display(Display::Flex).flex_direction(FlexDirection::Column)) {
View(style: Css::new().display(Display::Flex).flex_direction(FlexDirection::Row).gap(px(8)).padding(px(16))) {
ForEach(each: || (0..LAYERS.len()).collect::<Vec<_>>(), key: |i: &usize| *i, children: move |i: ReadSignal<usize>| {
let i = i.get_untracked();
render! { Chip(index: i, layer: layer) }
})
}
List(
each: move || (0..CRATES.len()).filter(|&c| layer.get() == 0 || CRATES[c].1 == layer.get()).collect::<Vec<_>>(),
key: |c: &usize| *c,
children: |c: ReadSignal<usize>| render! { Row(name: CRATES[c.get_untracked()].0) },
style: Css::new().flex_grow(1.0),
)
}
}
}
#[component]
fn chip(index: usize, layer: RwSignal<usize>) -> Element {
render! {
View(
on_tap: move |_| layer.set(index),
style: computed(move || Css::new().padding((px(6), px(12))).border_radius(px(16))
.background_color(Color::hex(if layer.get() == index { 0x7C5CFF } else { 0x2A2A33 }))),
) {
Text(value: LAYERS[index], style: css!(color: Color::hex(0xFFFFFF), font_size: px(13)))
}
}
}
#[component]
fn row(name: &'static str) -> Element {
render! {
View(style: Css::new().padding((px(12), px(16)))) {
Text(value: name, style: css!(color: Color::hex(0xFFFFFF), font_size: px(17)))
}
}
} List is keyed and virtualised. When the filter changes, Whisker works out which keys appeared and disappeared, and the Host creates or releases only those rows. ForEach is the non-virtualised version for short collections. Neither uses unwrap(). The repository's own examples reach for use_context().unwrap(), but passing the signal as a prop, as Chip does here, avoids it.
The architecture is the interesting part. A shared Runtime (reactivity, the retained element tree and Taffy layout) decides what exists and where it goes, then sends each frame to a platform Host as a packet of changes. On iOS the Host is Swift and UIKit, on macOS AppKit, on Android Kotlin and Android views, on Windows C++/WinRT with WinUI 3 and Direct2D, on Linux GTK 4 with Pango, and on the web the DOM. Hosts measure and draw text, so text looks native on each platform. Accessibility is the Host's job too: on Apple platforms, a node's label and role become UIKit or AppKit accessibility properties. The idea is close to NSH's, but NSH also brings GPU and terminal backends, while Whisker keeps to native widgets.
Its lockfile is the smallest of any framework in this book, 46 packages against 92 for Yew, the next smallest, and the only shared layer is Taffy 0.13.0. There is no winit, no wgpu, no Parley, no cosmic-text and no AccessKit, because the Host does those jobs. Hot reload comes from whisker-subsecond, a fork of the Subsecond hot-patching engine from Dioxus Labs, which the Dioxus team kept working on after joining Cognition. Like Blinc and Rune, Whisker targets coding agents directly: npx skills add whiskerrs/whisker installs a skill for Claude Code, Codex, Cursor and others. The README calls it pre-alpha, and it had 604 GitHub stars and about 6,300 downloads. Both snippets here were compiled for the host and for wasm32-unknown-unknown, but compiling is all that was checked. Running an app needs whisker run and a simulator or browser, and the skill itself notes there is "no headless UI test runner yet".