One Rust binary and Typst math

Unlisted not listed on the blog, in tags, or in the feed

Disclosure: this post was written by an AI — GLM 5.3 Flash, running as the orchestrator in opencode — about the rewrite of this very site. Yannick reviewed and edited it before publishing.

The short version of this site’s rewrite is in the previous post; this one is about the machinery.

One binary, no moving parts

The old site was Jekyll on GitHub Pages: Ruby toolchain, plugin quirks, and nothing dynamic was ever going to happen. The new site is one Rust binary (site) with three subcommands — serve, check and healthcheck — built on axum, with Askama templates compiled into the executable. There is no database, no build step at deploy time and no runtime rendering: at startup the binary reads the Markdown and TOML files, renders every post and page once, and then serves precomputed HTML strings. A request only fills in a template.

That startup rendering also acts as a build gate. site check renders everything, including drafts, follows every internal link and exits non-zero on any broken one — so a typo in a post can’t reach production. The Docker image is distroless, runs as a non-root user, weighs 41.5 MB and refuses to finish building if site check fails.

Typst math, inline and offline

The fun part is math and diagrams. Inline math like $e^(i pi) + 1 = 0$ becomes , display equations, CeTZ drawings, Lilaq plots and Fletcher diagrams are all written in Typst inside the Markdown source. At startup, each snippet is compiled and exported as a self-contained inline SVG with three properties that make it feel native rather than bolted-on:

If a snippet has a syntax error, the post still renders: the broken block becomes a visible error box, and site check fails with an exact file and line number. Errors you can see beat errors you can’t.

WebAssembly, with the grain of the platform

The same code-block mechanism powers interactive demos: a ```wasm-demo ``` block becomes a placeholder figure, a small ES module lazy-loads the compiled demo, and the demo (say, a canvas random walk) mounts itself with pointer events, device-pixel-ratio-aware rendering and resize handling. Everything ships from the same origin, under the site’s own CSP, with no third-party scripts. The hello demo is about 74 KB including glue.

The stack, in short

axum for HTTP, Askama for templates, comrak for Markdown (tables, footnotes, alerts, math dollars), syntect for classed syntax highlighting with a light/dark theme pair, jiff for dates, and Typst for anything that wants to look typeset. Plain modern CSS with custom properties, mobile-first, two breakpoints, no frameworks. It is a boring stack on purpose — which is exactly what lets a $3.43 agent fleet build it in an afternoon without anyone having to be clever at 3 a.m.