MUDA is an extensible IDE. MUDA does anything. MUDA does things it probably shouldn’t. MUDA is unacceptably extensible.
MUDA Unacceptably Does Anything
MUDA (MUDA Unacceptably Does Anything) is an experimental, highly extensible text editor and IDE framework built in Rust. It emphasizes a strict clean architecture, domain-driven design, and a clear separation between the core editing domain and the view/presentation layer.
Designed to be "unacceptably extensible," MUDA aims to provide a robust foundation where every aspect of the editor—from keybindings and commands to rendering and language services—can be customized and extended.
- Clean Architecture: Core domain logic (documents, text buffers) is completely decoupled from the UI/View layer (cursors, scrolling).
- Workspace-Centric: Manages multiple documents, views, and projects within a unified lifecycle.
- Dual-Mode Launch: Automatically adapts its UI based on context—launching with a directory opens the sidebar explorer, while launching with a file maximizes the editor.
- Robust Text Model: Features a high-performance text buffer with efficient edit operations and coordinate mappings.
- Command System: A transactional command dispatch system supporting robust undo/redo history.
- Extensibility First: Built with an event-driven architecture and plugin system in mind.
- Rust stable toolchain (1.70+ recommended)
cargo build --releaseTo run the editor:
cargo run --releaseTo open a specific file or directory:
# Opens the current directory with the file explorer sidebar visible
cargo run --release -- .
# Opens a specific file with the editor focused and sidebar hidden
cargo run --release -- src/main.rsCtrl + s: Save current documentCtrl + b: Toggle Sidebar visibilityCtrl + h: Focus Sidebar (if visible)Ctrl + l: Focus EditorEsc: Quit (prompts if unsaved changes exist)
Ctrl + c / x / v: Copy, Cut, PasteCtrl + z / y: Undo, RedoCtrl + a: Select AllCtrl + l: Toggle Line Numbers (when in editor)Shift + Arrows: Create/Extend SelectionCtrl + Left/Right: Move cursor by wordCtrl + Home/End: Move to start/end of file
j / korUp / Down: Navigate filesEnter: Open file or Enter directoryBackspace / Leftorh: Go up a directoryEsc: Return focus to editor (if file is open)
The codebase follows a strict separation of concerns:
src/
├── domain/ # Core business logic (Document, TextBuffer, etc.)
│ └── text/ # Text manipulation and storage models
├── view/ # UI state (Caret, Selection, Viewport)
├── view_model/ # Presentation layer (Render models, styling)
├── commands/ # Command pattern implementation (Undo/Redo transactions)
├── events/ # Event bus and domain event definitions
├── syntax/ # Syntax highlighting and parsing logic
├── app.rs # Main application state and event loop orchestration
├── draw.rs # TUI rendering logic (using Ratatui)
└── main.rs # Entry point and terminal setup
For a deep dive into the project's domain glossaries, core concepts, and architectural decisions, please refer to MUDAEDITOR.md.
- Document: The authoritative source of truth for text. It owns the
TextBufferandUndoHistorybut knows nothing about how it is displayed. - EditorView: A projection of a document. It owns the
Caret,Selection, andViewport(scroll position). Multiple views can point to the same document. - ViewModel: An immutable snapshot created from the Document and View, ready for rendering. This ensures the UI is always drawing a consistent state.