Projects

muda

An experimental text editor and IDE framework built in Rust. Designed around clean architecture — core editing logic (documents, text buffers, commands) is completely decoupled from the UI layer. The name stands for "MUDA Unacceptably Does Anything." 349 commits and counting.

Architecture

Document — The authority source for text. Owns the TextBuffer and UndoHistory but has no knowledge of how it's displayed. Multiple views can reference the same document simultaneously.

EditorView — A projection of a document that manages caret position, selection state, and viewport. Handles the mapping between buffer coordinates and screen coordinates.

ViewModel — Immutable rendering snapshot generated from EditorView state. The TUI layer (built on Ratatui) only sees ViewModels, never touches domain objects directly.

Command System — All edits go through a transactional command dispatcher. Every operation is undoable, and commands compose into larger transactions for multi-step operations.

Features

Editor
  • High-performance text buffer
  • Full undo/redo with transaction history
  • Syntax highlighting
  • Line numbers, word/file navigation
  • Selection and clipboard operations
Workspace
  • Multi-document management
  • File explorer sidebar
  • Dual-mode launch (file vs directory)
  • Event-driven plugin architecture
  • Keyboard-driven UI (Vim-influenced nav)

Project Structure

domain/Core business logic — Document, TextBuffer
view/UI state — Caret, Selection, Viewport
view_model/Immutable rendering snapshots
commands/Command pattern with undo/redo transactions
events/Event bus and domain event definitions
syntax/Syntax highlighting and token parsing