Anvilforge
Web artisans, forged in Rust.
Laravel's developer experience, Rust's runtime. Same anvil make:model muscle memory, type-checked end to end, single static binary. Coming from Laravel? Here's the cheatsheet.
Quickstart
# one-time install (pre-built binary, no compile)
|
# or, if you prefer the slower-but-Rust-native path:
# cargo binstall anvilforge-cli # downloads the release binary
# cargo install anvilforge-cli # compiles from source (5–15 min on cold toolchain)
Open http://localhost:8080. That's it. No .env to copy, no DATABASE_URL to configure — anvil new writes .env for you with a fresh APP_KEY, creates the SQLite DB file on disk, and SQLite is the default (zero-config, just like laravel new).
Already running Postgres or MySQL (e.g. via Laravel Herd)? Skip the .env edit:
What you got:
- Routing (
routes/web.rs,routes/api.rs) - A Forge layout + welcome page
- A
usersmigration +Usermodel - The full Anvilforge container (db pool, cache, mailer, queue, storage)
- File-watching hot reload via
anvil dev
Common anvil commands
Published crate map
The framework is one logical project, split into multiple crates published under the anvilforge- namespace:
| Crate on craltes.io | Imported as | Role |
|---|---|---|
anvilforge |
anvilforge |
Facade — use anvilforge::prelude::*; |
anvilforge-core |
anvil_core |
HTTP layer, container, auth, queue, mail, cache, sessions, storage, scheduler, validation |
anvilforge-derive |
anvil_derive |
Proc macros: FormRequest, Job, Migration |
anvilforge-cast |
cast |
ORM facade |
anvilforge-cast-core |
cast_core |
Model trait, query builder, schema, migrations |
anvilforge-cast-derive |
cast_derive |
#[derive(Model)], #[has_many], #[belongs_to] |
anvilforge-templates |
forge |
Template runtime: stack buffer, @vite helper, escape |
anvilforge-templates-codegen |
forge_codegen |
Forge → Askama preprocessor |
anvilforge-broadcast |
reverb |
WebSocket server (Pusher-compatible) |
anvilforge-cli |
— | smith CLI binary |
anvilforge-test |
anvil_test |
Test client, factories |
In practice you only ever depend on anvilforge — the facade re-exports everything you need via anvilforge::prelude::*.
Tuning the dev loop
The default anvil dev already matches Laravel for everything except the
Rust file edit:
- 0s — template (
.forge.html), config (config/anvil.toml), or static asset edit. Hot-reloaded per request whenAPP_ENV != production. - 1–2 s — Rust handler rebuild + restart, with the workspace's tuned
[profile.dev].
For sub-second Rust iteration on stable Rust, opt into the dylib hot-patch pattern (same technique Bevy and Dioxus use):
The full dev-loop tuning guide — sccache, mold/lld, the Cranelift
codegen backend, and the hot-patch ABI limits — lives in
docs: tuning the dev loop. Run
anvil doctor to see what's already installed locally.
Status
POC. The architecture is validated end-to-end against examples/blog. Initial publish to crates.io is in progress — versions start at 0.1.0.
License
MIT — see LICENSE