Modern Emacs-like Editor
| Readme.md | First commit | |
Kerning — Modern Emacs-like Editor (Project Log)
This document is a living README + project memory for a long-term editor project inspired by Emacs, but designed with modern constraints and capabilities.
Its purpose is threefold:
- Track architectural decisions and rationale
- Record learning milestones (especially Rust)
- Act as context recovery if this chat is lost or handed to another LLM
Project Goal
Build a modern, extensible text editor with:
- Configuration as code (no predefined options)
- A long-running, introspectable runtime
- First-class self-documentation
- A rich GUI (mixed fonts, widgets, panels)
- True multithreading
- High performance competitive with Neovim
The editor is not just configurable — user code becomes part of the editor itself at runtime.
Technology Choices
Core / Backend
-
Language: Rust
-
Responsibilities:
- Text buffers and data structures
- Rendering and layout
- Scheduling and threading
- Safe long-running runtime
- Plugin/extension host
Rust was chosen for:
- Performance
- Memory safety
- Strong concurrency model
- Suitability for large, long-lived systems
User / Configuration Language
-
Language: Lua
-
Role:
- Configuration as executable code
- Defining commands, keybindings, UI behaviors
- Runtime customization
Lua was chosen for:
- Simplicity and embeddability
- Proven performance (Neovim)
- Low cognitive overhead
Development Style
-
Pair-programming-like workflow
- Assistant proposes small, manageable tasks
- User implements them independently
- Assistant reviews, critiques, and suggests improvements
-
No code generation by assistant
- All learning and implementation is user-driven
- Assistant focuses on guidance, architecture, and feedback
-
Incremental Rust learning
- Tasks are designed to teach Rust concepts gradually
- Editor architecture evolves alongside Rust proficiency
High-Level Architecture (Initial)
-
Editor Runtime (Rust)
- Long-running process
- Owns all state
-
Command System
- Commands are functions with metadata
- Keybindings map to commands
-
Lua Integration
- Lua code loaded as modules
- Can define commands and interact with runtime
- No separate "config phase"
-
Introspection & Documentation
- Symbols, commands, and modules carry metadata
- Help system queries live runtime state
-
GUI (future phases)
- Native, GPU-accelerated UI
- Not HTML-based
Milestones
Phase 0 — Foundations (Current)
- Rust toolchain setup
- Basic Rust project structure
- Understanding ownership, borrowing, lifetimes
- Minimal executable editor shell
Working Agreement
- This README is updated as decisions are made
- Each task should be small enough to complete in ~1–2 sessions
- Mistakes are expected and valuable
- Architectural clarity > feature count
Notes for Future LLMs
If you are reading this without chat history:
- The user is intentionally learning Rust
- Do NOT write code for them
- Provide conceptual guidance and task breakdowns
- Assume Rust is new, but editor concepts are not
The assistant should act as a senior systems engineer and mentor, not an implementation engine.
Project Name: Kerning