hn.today

Rune: Rust VM for Emacs

github.com60 points18 comments
Screenshot of Rune: Rust VM for Emacs

Rune is an experimental effort to build an Emacs core in Rust, based on the idea that Rust could bring safer memory management, faster components, and eventual multithreaded Elisp execution to Emacs without abandoning compatibility with existing Lisp packages. Its stated ambition is for programs that work in Emacs to keep working in Rune, while using Rust’s ecosystem to improve areas such as garbage collection, regular expressions, and JSON handling. The project is at an early stage: it has a basic Elisp runtime, and its immediate target is a minimal editor with buffers, text insertion and deletion, cursor movement, line wrapping, scrolling, file access, and display tables.

The implementation includes Emacs-style objects represented with tagged pointers, a hand-built Lisp reader, an environment for symbols and bindings, a garbage collector, and a bytecode virtual machine using Emacs opcodes. A basic interpreter helps bootstrap Emacs’s bytecode compiler, and Lisp files from Emacs 29.1 are loaded as the project develops. Many built-in functions remain incomplete or stubbed, so progress involves loading more Lisp files and implementing the primitives they require. Tests can compare Rune’s evaluation with GNU Emacs, including property-based tests over generated inputs. The repository also provides commands for running the runtime and its REPL, guidance for contributions, and design material on Rust internals, garbage collection, and a possible multithreaded Emacs.

Read on github.com18 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.