<< Back / The Roadmap / Text Editor GUI in Rust / ~30 minutes
Roadmap
What's built, what's next, and what's deliberately not happening.
The tutorial is linear: lessons count upward and every part starts from the editor the previous part left behind. Parts are a reading aid, not directories.
Lessons are written just-in-time. A part is planned here in one line; its lessons are written only once the part before it is finished and running. This is not fastidiousness: every propagation bug in this tutorial’s history came from writing lessons ahead of the working code.
Done
| Part | Lessons | What it delivered |
|---|---|---|
| A working editor | 1–12 | Opens files, edits and saves them without corrupting UTF-8, highlights Rust, tabs across buffers, degrades honestly above 512 KB, keeps its text in a rope with a measured justification, and tests the parts worth testing |
| 1 — Don’t lose my work | 13–15 | The editor cannot silently discard your edits by any route |
| 2 — Files from inside the editor | 16–18 | A picker that lists, navigates and opens; filenames stored in the type that can hold them; a file’s line endings come back the way they went in |
| Lesson | Title | What it delivered |
|---|---|---|
| 13 | Knowing What Changed | The buffer knows whether it differs from disk, and says so on the tab and in the status bar |
| 14 | The Index That Outlived Its Buffer | Closing a buffer, and the stale-index bug lesson 9 predicted |
| 15 | Being Asked First | A confirmation before closing a modified buffer or the window, and your first hand-written enum |
| 16 | The Names in a Directory | fs::read_dir behind a Ctrl+O picker; an iterator of Results, and a lossy line written on borrowed time |
| 17 | Paths That Aren’t Strings | Path/PathBuf/OsString replace String everywhere a filename lives; the picker tells directories from files and navigates |
| 18 | Line Endings You Didn’t Write | enum LineEnding detected at open and applied at save, so a CRLF file round-trips byte for byte; Cow, derive(PartialEq, Debug), and a borrow error that a Cow can cause |
Next
| # | Part | Lessons | What you’ll learn |
|---|---|---|---|
| 3 | Buffers that aren’t files yet | 3 | The buffer list stops being fixed at start-up: New, Save As, and an editor that can hold nothing |
| 4 | Many files, many modules | 3 | mod, pub, use crate::, visibility, multi-file layout |
| 5 | Search in file | 3–4 | Iterator chains, byte and char indices, highlighting a match |
| 6 | A second language | 3 | Table-driven vs enum vs trait, Path::extension |
| 7 | Themes | 3 | Style/Visuals, Default, const tables |
| 8 | Files on disk | 3–4 | Recursion and ownership, lazy expansion, tree state across frames |
| 9 | Command palette | 4 | Fuzzy matching, command enums, keymaps |
| 10 | Line numbers | 3 | Painting a gutter from galley.rows; wrapped rows vs real lines |
| 11 | Git aware | 5–6 | An FFI-shaped API, lifetimes across a library boundary, diffing, caching |
| 12 | Projects | 4 | serde, config paths, versioned formats, migration |
| 13 | Search across a directory | 4 | The ignore crate, parallelism, where rayon earns its place |
| 14 | Diagnostics from cargo check |
5–6 | An async runtime inside a frame loop that sleeps; subprocess lifecycle, streaming, cancellation |
| 15 | ACP | 3–4 | JSON-RPC over stdio, protocol versioning |
Not happening
| Not doing | Why |
|---|---|
| Owning the text rendering | Reimplementing text input, selection, clipboard and IME is where most hobby editors die. Line numbers and git gutter marks are reachable without it, by painting beside rows egui already positions. Revisit only if multiple cursors becomes a goal |
| Multiple cursors | The one feature that genuinely requires owning the rendering |
| Split panes | Layout algebra with little Rust in it |
| Minimap | Decoration |
| Autosave | Needs a timer, a temp-file strategy and a recovery path. If it ever happens it belongs near projects, not in part 1 |
| Terminal panel | PTY handling is a project of its own and teaches little about editors |
| Plugin system | Ruled out by MISSION.md, correctly |
| LSP | Optional, and much cheaper after part 14 shares its transport. Pick it up only if wanted |