Open source · MIT · v0.1.0

Rust infrastructure.
Lua business logic.

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.

  • No system Lua required
  • One binary
  • Postgres · SQLite · MySQL
~/apps
$ 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
Business logic Lua 5.4
Runtime Rust + Axum

Why Bolt

Two layers. One deployment.

Keep the expensive, security-sensitive infrastructure in Rust. Keep the parts that change constantly in Lua, where a restart is enough.

Rust where it counts

Axum, Tower, SQLx and Tera do the heavy lifting. One process, one binary, predictable performance.

Lua where it changes

Routes, controllers, middleware, validation and workflows live in Lua. Change business rules without a Rust rebuild.

A real database layer

Postgres, SQLite and MySQL through SQLx, with raw SQL, a fluent query builder, transactions and pagination.

Views that ship

Tera layouts, includes, macros and custom filters, plus asset helpers and a view response builder.

Batteries included

Server-side sessions, auth hooks, cache, file storage, validation, structured logging, jobs and scheduled tasks.

Built for operators

Profiles, route inspection, migrations, daemon commands, health and metrics endpoints, and a CLI that gets out of the way.

Architecture

A small Rust edge around a fast Lua core.

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.

Client HTTP
Axum Rust edge
Lua VM pool Lua 5.4
Response text · JSON · view
01

Rust edge

Axum, static files, sessions, request dispatch, health and metrics.

02

Lua runtime

Routes, controllers, middleware, validation and business workflows.

03

Data & views

SQLx, Tera, cache, storage and the helpers behind the Lua globals.

Long-lived workers, isolated state.

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/web.lua LUA
-- 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

Fast where it counts.

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.

Rust edge 81.7k req/s · /api/ping
Lua handler 37.2k req/s · /api/ping-lua
Lua + SQLite 26.6k req/s · /db-lua
Lua + Tera 29.7k req/s · /bench/template
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

One command. Then build something.

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.

Then scaffold and run your first app:
bolt new myapp && cd myapp && bolt run
Linux x86_64 · aarch64
macOS Apple Silicon · Intel
Windows x86_64 · PowerShell 5+

Looking for a specific version? Browse GitHub Releases. Linux builds target glibc 2.35 or newer.

Documentation

From first route to production.

The user guide covers the Lua business layer. The developer docs cover the Rust workspace, configuration, runtime internals and release notes.

Read the full manual

User API docs, developer notes and the project roadmap.