Skip to content
Built with it

Showcase

Real programs, not mock-ups. Two of them ship as downloads, one is a separate project, and the rest are in the repository with a command each. Every screenshot here came out of the program itself.

The form designer

applicationdesktopships as a download

A visual designer for .dform files — and a Denise application itself

Palette, canvas, inspector and outline, with snapping guides, alignment, grouping, undo that is exact to the byte, and F5 to run the form. It is not Tauri and not a web page: the canvas draws the form with the same code that will draw it on the panel, so what is on screen is what ships. It is also the first real application written on the toolkit, which is how the toolkit finds out what it lacks.

$ cargo run -p denise-designer -- forms/reference.dform

squint

applicationdesktopseparate project

A text editor for files too big for text editors

Opens a file of any size instantly and holds almost none of it in memory: a piece table over the file on disk, a sparse line index built in the background, syntax highlighting through syntect. Its whole window is DeniseUI — the TextArea edits the engine’s document through the toolkit’s TextDocument trait, so the widget never learns how big the file is, and the tab strip that closes, drags and renames is the toolkit’s Tabs. It is where several of the toolkit’s newer features were found.

table-editor

examplewindow or panel

A record editor: a grid, a form, validation, a modal and CSV

About as much user interface as a small internal tool has. Nine row nodes exist however many records there are; the rules live in table.rs, which knows no widget exists and is unit tested without a display. The same app.rs drives a window and a bare panel — only main.rs differs, by about fifty lines.

$ cargo run -p table-editor
$ cargo run -p table-editor --no-default-features --features kiosk

solitaire

examplewindow or panel

Klondike, where a move repaints the piles it touched

A whole game with a mouse, a touch screen or the keyboard: drag the cards, double-click one home, take back any number of moves, and watch a game with nothing hidden play itself out. The bar, the clock and the questions are ordinary widgets. Each of the thirteen piles is a node of its own and the cards in the hand are a node that is moved, so the tree’s own damage is all the damage there is — on a Raspberry Pi 3A+ at 1920×1080 the table painted whole is 20 ms and a card carried across it is 3. The rules live in game.rs, which knows no widget exists and is tested without a display.

$ cargo run -p solitaire
$ cargo run -p solitaire -- --three
$ cargo run -p solitaire --no-default-features --features kiosk

browser

examplewindow or panel

A small web browser in which every visible thing is a widget

Real pages — Hacker News, Wikipedia, DuckDuckGo Lite — fetched over rustls, parsed with html5ever, laid out by the example’s own block-and-inline engine and drawn entirely through the toolkit. A page’s form controls are the actual TextInput, Checkbox, RadioGroup and Select, and they submit for real. No JavaScript, on purpose. It is the composability proof.

$ cargo run -p browser -- https://news.ycombinator.com

hello

examplestart here

Eighty lines: a message enum, a tree, an event loop

Start here. Half of it is comments, and it builds for a window or for a bare display with one feature flag. The same screen exists as a form file in examples/designed, so the two can be read side by side.

$ cargo run -p hello
$ cargo run -p hello -- --snapshot hello.ppm