Lattice v0.1.0
A modal, GPU-accelerated, plugin-first text editor in Rust
Combines vim's modal editing power with emacs's extensibility model on a non-blocking, multi-threaded core.
Four Paramount Goals
Performance
Imperceptible keystroke→glyph latency — within one display frame under any load, ratcheted by CI.
Extensibility
WebAssembly Component Model plugin host. Any language (Rust, Zig, Go, …). Capability-gated, crash-isolated.
Vim Modal Editing
Strict vim semantics. The grammar IS the public command API. Extensible motions, operators, and text objects.
Asynchronicity
Three-layer architecture via typed message passing. Multi-threaded by construction. Nothing blocks the UI.
Design Principles
Everything is a buffer
File tree, diagnostics, terminal, REPL — all are buffers placed by the user into panes via splits. No fixed sidebar or bottom-panel concept. :bn, :bp, :ls, :bd work uniformly across all kinds.
Modes own their surface
A feature is a mode that owns its keymaps, action handlers, decorations, and subscriptions. The host is a thin substrate with no per-feature branch. A new provider crate adds zero Editor:: methods.
One extension substrate
WASM Component Model is the single substrate for plugins AND user configuration. No Lua, no vimscript, no elisp. TOML for static data; init.rs (compiled to WASM) for programmable config.
Current Status
Modal engine, ex-commands, async actor, snapshot model, completion, help, basic perf benches, CI — active development.
View implementation ledger →Keystroke→glyph latency (TUI, debug build, 2300-line file). Ratcheted — CI fails on regression. Target: within one display frame.
View benchmarks →Pre-1.0 breaking changes expected. Pluggable WASM init, plugin lifecycle, keymap teardown, decoration rendering, and more in progress.
Read the docs →Quick Start
# Clone and build
git clone https://github.com/dhruvasagar/lattice
cd lattice
cargo build --release
# Open a file
cargo run --release -- README.md
# Or with the GPU renderer
cargo run --release --features gui -- --gui README.md
# Run tests
cargo test --workspace