The Damask Book
From an empty project to a page built out of composed components — read front to back.
The book teaches Damask in the order you meet it. Each chapter builds on the one before, so a reader who starts at the beginning never has to take anything on trust, and every rule arrives with the problem that motivates it.
You need Rust 1.88 or newer and one line in Cargo.toml. There is no build
script and nothing to configure — chapter two starts from an empty project and
finishes with a rendered component.
If you already know the shape of the thing and want the exact rule, the reference covers the same ground arranged for lookup instead.
01
Why Damask
A component model for server-rendered HTML — named slots, checked props, HTML-aware attributes — and what that trade costs.
02
Your first component
Start the project, write a struct and a template beside it, and render a status badge.
03
The deploy feed
Loops, conditionals, an empty state, and the Rust inside a brace tag.
04
The service table
Classes that assemble themselves from conditions, data that expands from one value, and attributes that know they are HTML.
05
Assembling the page
Nesting components, the chrome around them, and a document shell with a hole in it.
06
The rollup tiles
Snippets, fragments, and what a template can ask about its own slots.
07
Writing it out
A file on disk, the whitespace features, a test suite, and the traits underneath.
08
The live fleet
Awaiting inside a template, the pair of traits that swaps in, and rendering a page from a request handler.
09
Beyond helm
What changes when seven components become forty: project shape, a chrome value, tones, previews.