back to home

eval-exec / neomacs

NEO Emacs: A GPU-powered Emacs written in Rust with a modern display engine. Aiming for modern design/multi-threaded Elisp, 10x performance and 100% Emacs compatibility. πŸš€ Inline 4K images/4K videos/WPEWebKit using GPU acceleration, DMA-BUF, ZERO-COPY. Rich animation effects support.

528 stars
20 forks
27 issues
Emacs LispRustCommon Lisp

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing eval-exec/neomacs in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/eval-exec/neomacs)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

"I started Neomacs because I love Emacs, I respect Emacs, and I want to make it better." β€” *Eval Exec* > ✨ *"While other editors can save your files, only Emacs can save your soul."* ✨ > **Note:** Neomacs is in active alpha development. Expect rough edges, breaking changes, and missing features. Contributions and bug reports are very welcome! > **Fork notice:** Neomacs is a hard fork of GNU Emacs, forked from commit . The changes are too invasive to ever be accepted upstream, so we did not preserve the original git history to keep the repository lightweight. If you need the full Emacs git history for reference, open an issue, and we can re-add it. > **Why a fork, not from scratch?** Neomacs aims for 100% compatibility with official GNU Emacs β€” every config, package, and workflow should just work. By forking, we keep the original Emacs C code as a reference and test oracle: we can verifying that each Rust rewrite produces identical behavior, ensuring nothing breaks as subsystems are replaced one by one. --- The Problem Emacs is a 40-year-old C codebase that hasn't kept up with modern hardware or software engineering: β€’ **Display engine** β€” ~50,000 lines of C in , designed for text terminals in the 1980s. CPU-only rendering, no GPU acceleration, no native video/animations, no smooth visual effects β€’ **Large images** β€” rendering slows down significantly β€’ **Video playback** β€” not natively supported β€’ **Modern animations** β€” no smooth cursor movement, buffer transitions, or visual effects β€’ **Web content** β€” limited browser integration β€’ **GPU utilization** β€” everything runs on CPU while your GPU sits idle β€’ **Elisp performance** β€” no inline caching, stop-the-world GC, dynamic dispatch overhead. Even with native-comp (AOT), Elisp lacks runtime JIT optimization, speculative inlining, and concurrent GC β€” leaving significant performance on the table β€’ **Unsafe C codebase** β€” ~300,000 lines of unsafe C with manual memory management, monolithic architecture (runtime and editor entangled), single-threaded design that prevents real concurrency The Solution Throw it all away and start fresh. **Neomacs** is rewriting Emacs from the ground up in **Rust** β€” starting with the display engine and expanding to the core: β€’ **GPU display engine** *(done)* β€” ~4,000 lines of Rust replacing ~50,000 lines of legacy C, powered by wgpu (Vulkan/Metal/DX12/OpenGL) β€’ **Rust layout engine** *(done)* β€” bypasses entirely, reads buffer text via FFI and computes layout in Rust β€’ **Inline video/images/WebKit** *(done)* β€” 4K video, GPU-decoded images, and WPE WebKit browser views embedded directly in buffers β€’ **21 scroll effects, 8 cursor modes, 10 buffer transitions** *(done)* β€” GPU-accelerated animations running on the render thread at display refresh rate β€’ **Zero-copy DMA-BUF** *(done)* β€” efficient GPU texture sharing (Linux) β€’ **Rewrite entire Emacs core in Rust** *(in progress)* β€” replacing all ~300,000 lines of C with safe, modern Rust: Elisp runtime, evaluator, bytecode VM, GC, buffer/window/frame subsystems, and all editor internals β€’ **True multi-threaded Elisp** *(planned)* β€” real concurrency for the Lisp machine, not just cooperative threading β€’ **10x performance, and 100% Emacs compatibility.** *(planned)* β€” Rust-optimized Lisp machine with JIT compilation and inline caching --- Showcase 🎬 Neomacs youtube video Animations (Cursor, Buffer Switch, Scroll) https://github.com/user-attachments/assets/85b7ee7b-3f4a-4cd2-a84f-86a91d052f11 GPU Text with Rounded Box Faces Inline 4K Images GPU-decoded directly β€” no CPU cost, won't block Emacs main thread. Inline Web Browser (WPE WebKit) GPU backend, DMA-BUF zero-copy. Inline Terminal (Alacritty) GPU-backed terminal emulator embedded in Emacs buffer. Inline 4K Video Playback DMA-BUF zero-copy, GPU backend β€” no CPU cost. https://github.com/user-attachments/assets/275c6d9a-fced-44f6-8f43-3bbd2984d672 --- Features Working Now | Feature | Description | |---------|-------------| | **GPU Text Rendering** | Hardware-accelerated text via wgpu (Vulkan/Metal/DX12/OpenGL) | | **Video Playback** | GStreamer + VA-API hardware decode with DMA-BUF zero-copy | | **Cursor Animations** | 8 modes with 7 movement styles and configurable spring trail | | **Scroll Animations** | 21 scroll effects with 5 easing functions | | **Buffer Transitions** | 10 buffer-switch effects (crossfade, slide, page-curl, etc.) | | **DMA-BUF Zero-Copy** | GPU-to-GPU texture sharing via Vulkan HAL (no CPU readback) | | **Inline Images** | GPU-accelerated image rendering in buffers | | **Inline WebKit** | WPE WebKit browser views embedded in buffers | Animations All animations run on the GPU render thread at display refresh rate, independent of the Emacs redisplay. Configure everything from Elisp. Cursor **8 particle/visual modes** (Neovide-inspired): | Mode | Description | |------|-------------| | | No animation, instant movement | | | Smooth interpolated movement (default) | | | Particles shoot backward from cursor | | | Comet-like trail follows cursor | | | Sparkly particles scatter around cursor | | | Shockwave ring expands from cursor | | | Concentric rings emanate outward | | | Animated outline glow | **7 movement styles** controlling how the cursor interpolates between positions: | Style | Description | |-------|-------------| | | Smooth deceleration, no fixed duration (uses speed param) | | | Critically-damped spring, Neovide-like feel (default) | | | Gentle deceleration curve | | | Stronger deceleration curve | | | Sharp deceleration curve | | | Smooth S-curve | | | Constant speed | The spring style also supports a **4-corner trail effect** where leading corners snap ahead and trailing corners stretch behind, controlled by a parameter (0.0-1.0). Buffer Switch (Crossfade/Transition) **10 buffer-switch effects** triggered when the visible buffer changes: | Effect | Description | |--------|-------------| | | Instant switch | | | Alpha blend between old and new (defaul…