This Website
A full-stack Rust application with server-side rendering, WASM hydration, and a view-source mode built in from the start.
- Rust
- Leptos
- Axum
- WASM
- lettre
- CSS
- Cloud-hosting
- Let's Encrypt
- Git
- CI/CD
Full-stack Rust
The site is built with Leptos 0.6, a fine-grained reactive framework for Rust. Axum handles HTTP on the server via leptos_axum, which renders each route to HTML on request. The same component tree is then
shipped as a WASM bundle that hydrates the page on the client, enabling SPA-style
navigation without a full reload.
Server functions (like the contact-form email sender) are declared with #[server] and compiled only into the server binary — the client sees a typed async
function that makes an HTTP POST behind the scenes.
View Source Mode
Every page exposes a ?source=1 query parameter. When active, the router renders the raw Rust source of the
current page instead of the page itself — embedded at compile time via include_str!(). No round-trips, no GitHub links, just the code that generated what you were
just looking at.
cargo-leptos
cargo-leptos orchestrates the dual compilation: an SSR server binary (native target) and a
WASM client bundle, built in parallel. The release profile uses opt-level = "z" and LTO to minimise binary size.
cargo leptos build --releasePipeline
The project is hosted on a local Gitea instance. The project is simple,
so the infrastructure is too — on push to master, the pipeline:
- systemd timer monitors the gitea repository for new commits on the production branch
- Builds the new commits with
cargo leptos build --release - Triggers a redeploy on the server
Pure CSS
No CSS framework. A single style.css file using custom properties for the colour palette (dark background, warm-gold
accent), IBM Plex Sans & Mono for body and code, and Playfair Display for headings.
Animations are CSS keyframes only.