wesleygrimes/nails
Developer ToolsA Rust web framework that recreates Rails app layout, generators, Active Record models and testing conventions.
What it is
Nails ports the Ruby on Rails development model to Rust. An app gets the familiar app/, config/, db/ and test/ layout, but models and controllers are plain synchronous Rust with no .await. Models are structs annotated with #[nails::model]; associations are attributes such as #[has_many(Comment, dependent = destroy)], and validations live in a Validations implementation that yields query helpers like Post::where_eq(...).order(...).load() model example.
The framework covers Active Record-style models, controllers and resource routes, Jinja views using Rails helper names, generators, background jobs, mailers, fixtures and browser system tests. HTTP is handled by axum and tokio, and views use minijinja stack notes. SQLite is the default database, with Postgres selected via -d postgresql database docs.
The main audience is developers who know Rails and want its conventions, CLI vocabulary and app structure without Ruby, or Rust developers who want scaffolding and an ORM layer rather than assembling axum, a database layer and view rendering themselves. The project is explicitly experimental, built by one person, and the README recommends side projects rather than production use; known gaps are tracked as Rails parity issues parity list.
Quick start
Prerequisites are Rust installed through rustup, plus the C build tools for the platform rustup. The CLI is installed from a checkout, and generated apps refer back to that checkout by path, so keep it in place.
git clone https://github.com/wesleygrimes/nails
cd nails
cargo install --locked --path crates/nails-cli
cd ..
Set NAILS_PATH to the absolute path of another checkout's crates/nails directory if you need to use a different copy. Then create and run an app quick start:
nails new blog
cd blog
nails generate scaffold Post title:string body:text published:boolean
nails db:migrate
nails server # http://localhost:3000/posts
Running nails without arguments lists all commands. nails new blog -d postgresql creates a Postgres app; database configuration through database.yml and DATABASE_URL, including how tests run on Postgres, is covered in the database guide. For a Rails-to-Nails mapping of associations, queries, routes, params, jobs and commands, see the migration table.
Constraints
- Status is experimental. The README positions the framework for side projects and not production, with unimplemented Rails features such as Active Storage, Action Cable, MySQL and Kamal deploys listed as open parity issues parity issues.
- App code is synchronous Rust by design; this differs from async-first frameworks such as Loco, which also uses SeaORM instead of Nails' own Active Record layer comparison.
- Generated apps depend on the local Nails checkout by path, so moving or deleting the checkout breaks the path dependency unless
NAILS_PATHis updated. - System tests run in headless Chrome, and a failing system test saves a screenshot under
tmp/screenshots/. - The README badge states MIT OR Apache-2.0, and the repository lists Apache-2.0; the two license files are MIT and Apache-2.0 license files.
HotRepo's take
Nails appeared on HotRepo's new-project list for the Rust language on 2026-12-04, recording 104 stars and 3 forks with 4 stars gained in a roughly 1.5-hour observation window. The hourly star samples from that day show 101 to 104 stars. That is a small, early signal: the repository was created in December 2026, has only a handful of forks, and has not appeared on the all-language daily rank. The interesting technical distinction is the deliberate bet on synchronous code and a Rails-shaped layout, which makes it easy to compare code side by side with a Rails app, but the same early state and explicit single-maintainer caveat are what should frame adoption decisions.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.