template-axum-htmx-tailwind
template-axum-htmx-tailwind copied to clipboard
Axum-based MPA using htmx for SPA-like functionality, styled with Tailwind.
Template: axum + htmx + tailwind
Backend
Frontend
Getting Started
This is an experimental template that I use as a base for my personal projects. There are a lot of opinionated and probably controversial design choices that I've made here. I cannot recommend using this template for your own projects, especially if you're new to Rust.
Notes
- Internally caches asset files. JavaScript and CSS files are pre-compressed at
startup with
brotliwith a max compression level. - Compresses HTML fragments with
brotliat a lower compression level viatower-compressionat runtime. - Sets Cache-Control headers for CSS, JS, WEBP, SVG, and WOFF2 by default.
- Uses
bunvia thebuild.rsscript to minify, hash, and bundle JS/TS/CSS. - Run with
cargo watch -x runto automatically rebuild on asset / source changes.