Colophon
How this site is built, for anyone curious about running Rust on ordinary hosting.
The application
One compiled binary, about 6.5 MB, which renders every page on the server. There is no JavaScript framework, no bundler, and no runtime to install alongside it.
- Axum — routing, request extraction, middleware.
- Askama — templates compiled into the binary at build time, so a typo in the HTML is a compile error rather than a broken page.
- sqlx — PostgreSQL without an ORM in the way. Schema migrations run automatically when the process starts, so the code and the database can never disagree about which came first.
- tower-http — compression and request logging.
The hosting
A DigitalOcean droplet managed by Laravel Forge — which is a PHP tool with no idea what Rust is, and doesn't need one. The binary runs as a supervisor-managed process listening only on localhost, and nginx sits in front handling TLS and passing requests through. Forge keeps doing the things it's good at: certificates, deployments, restarts.
Deployment
Pushing to the main branch puts the change live in about 45 seconds: fetch, compile, swap the binary atomically, restart. If the build fails the old version keeps serving — nothing half-deployed ever reaches the internet.
The restart is graceful. The process handles the shutdown signal and lets requests already in flight finish, so a deployment mid-page-load doesn't cut anyone off.
See it working
The notes page is a deliberately small demonstration of the whole path — a form post, a row written to PostgreSQL, and the page reading it back. Leave something on it if you like.
The source is on GitHub, including the deployment notes and the two or three things that went wrong on the way.