An opinionated GitHub template repository for building Rust services. It ships the configuration, supply-chain policy, CI, and Claude-agent conventions up front — plus documented patterns for the stack below — so a new project starts with the boring, load-bearing decisions already made.
This template ships no crates. The patterns are documented (with code) under
docs/; you add real crates undercrates/. Until you do,cargo buildreports "no members" — that is expected.
| Concern | Choice | Why |
|---|---|---|
| Workspace | Cargo workspace, crates under crates/ |
Edition 2024, resolver 3 |
| Local / test DB | SQLite (sqlite::memory: for tests) |
Zero-setup, fast |
| Production DB | Amazon Aurora DSQL (Postgres-compatible) | Serverless, scalable |
| Query layer | sea-query |
One query, both SQLite & Postgres backends |
| DB driver | sqlx |
Async, tls-rustls-aws-lc-rs |
| Crypto / TLS | aws-lc-rs |
Preferred over OpenSSL and ring |
| Web | axum |
Embedded server UI |
| Assets | rust-embed |
Single self-contained binary |
| i18n | fluent via i18n-embed |
Per-request locale negotiation |
| Styling | Tailwind CSS | Built to static/css/output.css, embedded |
Cargo.toml— virtual workspace with a curated, version-pinned[workspace.dependencies]menu and a strict[workspace.lints]baseline (clippypedantic+ panic/arithmetic/cast denies). Member crates inherit with[lints] workspace = true..rustfmt.toml,.clippy.toml,deny.toml,rust-toolchain.toml,.editorconfig— formatting, lint tuning, supply-chain policy (advisories, licenses, bans — OpenSSL/ringdenied), and a pinned toolchain..github/— CI (fmt, clippy,cargo test, dependency-review,cargo-deny; actions SHA-pinned, plussecure_workflows.ymlenforcing SHA pins) and Dependabot (cargo + actions, grouped, 7-day cooldown).Makefile—build,fmt,lint,test,deny,css-build,run,help.CLAUDE.md+.claude/rules/— conventions for therust-agentsClaude Code plugin (branching, Conventional Commits, continuous improvement).docs/— the patterns, with copy-pasteable code (see below).- Repo hygiene —
AGENTS.md(agent pointer toCLAUDE.md),CONTRIBUTING.md,SECURITY.md,.env.example,.gitattributes.
- Click "Use this template" on GitHub (or
gh repo create <name> --template smoketurner/rust-template). - Rename: update
repository/ package names,LICENSE-*copyright, and theSERVER_CRATEdefault in theMakefile. - Add your first crate under
crates/— seecrates/README.md. Once one crate exists, CI andcargo buildwork. - Read the docs as you wire up each layer.
| Doc | Covers |
|---|---|
| docs/architecture.md | Workspace layout, recommended crate split, lint inheritance |
| docs/database.md | SQLite ↔ DSQL pool, IAM auth, connection lifecycle |
| docs/dsql.md | Aurora DSQL SQL constraints (the deep reference) |
| docs/migrations.md | Dual migration dirs, DSQL-safe runner, async indexes |
| docs/sea-query.md | Backend-dispatch macros, Iden schema, OCC retry |
| docs/web-ui.md | axum + rust-embed + fluent + Tailwind |
| docs/crypto.md | aws-lc-rs default provider, keeping ring/OpenSSL out |
| docs/ci-cd.md | CI jobs, and the deferred Docker/build/scan/release patterns |
Dual-licensed under either of Apache-2.0 or MIT at your option.