Open Source Hacker News (GPT)

Neomacs: GPU rendered Rust hard fork of Emacs

EmacsRustGPU renderinghard fork

Neomacs is a hard fork of GNU Emacs whose Lisp tree is synced to emacs-31.1, with the C core fully replaced by Rust. The project's stated goal is to keep everything that makes Emacs Emacs — init.el, packages, and muscle memory — while rebuilding the machinery underneath. GNU Emacs itself serves as the test oracle: every rewritten subsystem is diffed against it to verify identical behavior, and real-world configs such as Doom Emacs are used as a daily test bed.

The display engine now runs on the GPU through wgpu (Vulkan, Metal, DX12, GL), with roughly 4,000 lines of Rust replacing the ~50,000 lines of xdisp.c. Buffers can host rich media: inline 4K video using typed Rust GStreamer and VA-API integration on Linux, GPU-decoded images that don't block the Emacs main thread, an inline WPE WebKit browser, and an Alacritty-based GPU terminal. DMA-BUF paths keep data on the GPU with zero copies, and typed fallbacks handle cases where native interop is unavailable. Animations run at display refresh rate — 8 cursor modes, 21 scroll effects, and 10 buffer transitions — all configurable from Elisp.

Hackability is extended below the Lisp line: where GNU Emacs' extensibility ends at the C display engine, Neomacs opens the whole frontend to Elisp, from render effects down to GPU shaders written in WGSL. The rest of the core — Elisp evaluator, bytecode VM, GC, portable dump, and editor internals — is pure, memory-safe Rust, and the same binary renders either on the GPU or in a TTY via `neomacs -nw`. The project is explicitly a work in progress with rough edges, breaking changes, and missing features; planned next steps include true multi-threaded Elisp.

Read original →

← Back to home