Rat docs

Rat

A tiny web framework where one .rat file is a server, a page, and its styles.

Read the docsGet started

What you write

A working reactive page in eight lines. The same file declares its state, its markup, and the handler that mutates it — no JS to write, no build step, one binary.

> server
name: 'Angelo'
count: 0

> page
<h1> hello [name]
<p> you've clicked [count] times
<button on_click[increment()]> click me

> increment[] >> count << count + 1

What it gives you

It's fast

Four metrics across three project sizes, median of five runs. The number to look at is hot reload at 1000 pages — the loader's mtime cache reparses only the touched file, so even a project with a thousand pages bounces in 39 ms.

project sizecold loadwarm loadhot reloadfull build
10 pages1.5 ms0.5 ms0.5 ms5 ms
100 pages9.8 ms3.6 ms3.1 ms54 ms
1000 pages170.9 ms48.5 ms39 ms840 ms

The docs walk through the dialect a piece at a time, with a runnable snippet for every feature. Start with the index or jump to setup.