rano is a from-scratch rewrite of GNU nano in Rust. Not a wrapper, not a fork — a complete reimplementation that aims to replicate the behavior and feel of GNU nano 8.7 while taking advantage of Rust's type system, memory safety, and modern tooling.
The name is a play on "Rust nano." The goal is to provide a familiar, lightweight terminal editor that nano users can switch to seamlessly, backed by a cleaner and more maintainable codebase.
GNU nano is one of the most widely-used terminal editors, but its C codebase uses global mutable state, linked lists for text storage, and ncurses for terminal I/O — patterns that make the code difficult to extend and reason about. rano asks: what would nano look like if you rebuilt it from first principles in a modern systems language?
| Aspect | GNU nano (C) | rano (Rust) |
|---|---|---|
| Terminal I/O | ncurses (C dependency) | crossterm (pure Rust, cross-platform) |
| State management | Global mutable variables | Central Editor struct |
| Text storage | Linked lists | Indexed vectors |
| Configuration flags | C preprocessor directives | Cargo feature flags + type-safe bitflags |
| Memory safety | Manual management | Ownership system |
Insert, delete, cut/copy/paste, word and line operations, auto-indent, and complete undo/redo history.
Forward and backward search with case sensitivity toggle and full regex support.
Built-in highlighting for 40+ languages. Uses .nanorc syntax definitions for compatibility.
Click to position cursor, click-drag to select text, scroll wheel navigation.
Open and switch between multiple files in a single session, just like nano.
Reads existing .nanorc configuration files, so your nano settings carry over.
The modular structure separates concerns cleanly — each file handles one domain. The central Editor struct owns all mutable state, replacing the scattered global variables in the original C implementation. This makes the control flow explicit and testable.