Rust where it counts
Axum, Tower, SQLx and Tera do the heavy lifting. One process, one binary, predictable performance.
Bolt is a single web engine with two layers: a durable Rust core for HTTP, views, database, cache and sessions, and an embedded Lua 5.4 runtime for the routes, controllers and rules that change every day.
$ bolt new myapp
Created Bolt app at ./myapp
$ cd myapp
$ bolt run
● Bolt server started on http://127.0.0.1:3000
profile: dev · lua: 5.4 · workers: auto
Why Bolt
Keep the expensive, security-sensitive infrastructure in Rust. Keep the parts that change constantly in Lua, where a restart is enough.
Axum, Tower, SQLx and Tera do the heavy lifting. One process, one binary, predictable performance.
Routes, controllers, middleware, validation and workflows live in Lua. Change business rules without a Rust rebuild.
Postgres, SQLite and MySQL through SQLx, with raw SQL, a fluent query builder, transactions and pagination.
Tera layouts, includes, macros and custom filters, plus asset helpers and a view response builder.
Server-side sessions, auth hooks, cache, file storage, validation, structured logging, jobs and scheduled tasks.
Profiles, route inspection, migrations, daemon commands, health and metrics endpoints, and a CLI that gets out of the way.
Architecture
Requests enter through Axum, hit the route registry, run in a long-lived Lua VM, and come back as text, JSON, HTML or a rendered view.
Axum, static files, sessions, request dispatch, health and metrics.
Routes, controllers, middleware, validation and business workflows.
SQLx, Tera, cache, storage and the helpers behind the Lua globals.
Bolt starts one OS thread and one Lua VM per worker. Requests are dispatched
round-robin, so each VM boots app/app.lua independently.
Use the database or Redis for state that must cross worker or process boundaries. The in-memory cache is shared inside one process, not across machines.
Read the architecture notes-- Routes are plain Lua tables and functions.
local Home = require("app.controllers.home_controller")
Route:get("/", Home.index, "home.index")
Route:get("/api/hello/:name", function(req)
return json({ hello = req.params.name })
end, "api.hello")
Performance
Release build of the hello-world benchmark suite, with 12 workers on a 12-thread desktop. Medians from three 5-second runs at 50 concurrent connections.
| Endpoint | Path | Req/s | Avg | P99 |
|---|---|---|---|---|
| Rust only | /api/ping |
81,708 | 0.6 ms | 1.6 ms |
| Lua handler | /api/ping-lua |
37,178 | 1.3 ms | 7.3 ms |
| Lua + view | / |
26,555 | 1.9 ms | 11.1 ms |
| Rust + SQLite | /db-rust |
52,815 | 0.9 ms | 3.7 ms |
| Lua + SQLite | /db-lua |
26,576 | 1.9 ms | 17.0 ms |
| Lua + Tera | /bench/template |
29,682 | 1.7 ms | 11.3 ms |
| Lua + cache | /bench/cache |
35,863 | 1.4 ms | 7.9 ms |
| Static asset | /assets/css/app.css |
11,717 | 4.3 ms | 8.1 ms |
Windows 11, Intel i5-12500 (6 cores / 12 threads), 12 workers, SQLite, in-memory cache and loopback load generation. Numbers are machine-specific; serve static files through a CDN or reverse proxy in production.
Install
Prebuilt binaries are published for Linux, macOS and Windows on every version tag. No Rust toolchain or system Lua is needed to run them.
curl -fsSL https://memran.github.io/bolt/install.sh | sh
Installs to ~/.local/bin. Set BOLT_INSTALL_DIR to
choose another directory, or BOLT_VERSION to pin a release.
irm https://memran.github.io/bolt/install.ps1 | iex
Installs to %LOCALAPPDATA%\Programs\bolt\bin. Set
BOLT_INSTALL_DIR or BOLT_VERSION to override.
bolt new myapp && cd myapp && bolt run
Looking for a specific version? Browse GitHub Releases. Linux builds target glibc 2.35 or newer.
Documentation
The user guide covers the Lua business layer. The developer docs cover the Rust workspace, configuration, runtime internals and release notes.
Install Bolt, scaffold an app and write your first route.
02Path parameters, named routes, middleware and handler modules.
03Raw SQL, the query builder, transactions and pagination.
04Profiles, environment variables, workers and runtime settings.
User API docs, developer notes and the project roadmap.