Introduction & Installation
Emacs GFX (egfx) is an independent, modern native graphics engine and OS child-view container host for stock GNU Emacs 29.1+.
Every package in this organization requires only stock GNU Emacs 29.1+ with zero external UI framework dependencies and zero OpenGL. Native rendering runs exclusively on each operating system’s modern graphics stack:
| Platform | Native GPU Pipeline | Text & Image Engine | Native Browser Engine (egfx-browser) |
|---|---|---|---|
| macOS | Cocoa + Metal (CAMetalLayer) |
CoreText + ImageIO (sRGB) | WKWebView (WebKit.framework) |
| Windows | Direct3D 11 + DXGI Flip Model + DirectComposition | DirectWrite + Direct2D + WIC | Edge WebView2 (pure C COM) |
| Linux | Vulkan 1.0+ WSI (X11 / Wayland, GTK4 & GTK3) | Runtime dlopen Pango / Cairo / GdkPixbuf |
WebKitGTK (runtime dlopen) |
Packages & Projected Repositories
Section titled “Packages & Projected Repositories”Development takes place in the emacs-gfx/emacs-gfx monorepo and projects automatically to five read-only standalone repositories:
Core Infrastructure (packages/)
Section titled “Core Infrastructure (packages/)”egfx: Pure-Elisp 60 FPS GPU canvas (egfx-canvas), retained native SDF scene engine (egfx-scene-apply), floating child-frame occlusion hole-punching, relative Pointer Lock, native Gamepad,< 1 msOS pipe events, versioned C Provider ABI (egfx_abi.hv3), and 1-click prebuilt module downloader (egfx-install-native).egfx-audio: Zero-dependency OS-native streaming PCM & 32-voice BGM/SFX audio mixer (CoreAudio, WinMM, PulseAudio).egfx-wgpu: Zero-copy Rustwgpudirect-GPU provider with WGSL shader hot-reload, PNG textures, 16K instanced 2D Sprite Batch, 3D depth mesh pipeline, non-blocking presentation, and CRT/Bloom/Vignette Post-FX.
Applications (apps/)
Section titled “Applications (apps/)”egfx-browser: Cross-platform native GUI web browser mounted inside Emacs windows viaegfx’s GPU-less native container host.
Game Ecosystem (games/ → emacs-gfx/egfx-games)
Section titled “Game Ecosystem (games/ → emacs-gfx/egfx-games)”All five layered game packages project together into emacs-gfx/egfx-games:
egfx-game(L1): 60 Hz 2D GPU game framework (zero-allocation Sprite Batcher, Sprite Atlases, Tiled.tmjtilemaps, collisions, particles, JSON saves, live-coding hot-reload,M-x egfx-new-game), shared modal controls & arrow-first keybinding manager (K), and built-in 3-world pixel platformer Starlight Meadow.egfx-retro(L2): Native Libretro console host (mGBA,Snes9x,FCEUmm,TIC-80,WASM-4,2048) with 1-click core/game installer (Celeste Classic, Apotris), 4-port Gamepad, TIFF save thumbnails, and rewind.egfx-doom(L2): Native C 3D DOOM / Freedoom FPS host with Pointer Lock mouse turning, Gamepad, 16-channel DMX digital SFX, and 1-click Freedoom WAD download.egfx-bevy(L2): Zero-copy Rust Bevy 0.15 ECS 3D host linkingegfx-wgpu-corewith a live Emacs ECS entity inspector.egfx-arcade(L3): EGFX ARCADE unified GPU cover-wall launcher with integrated 62 px GPU top navigation bar, category filters, instant search, favorites, built-in WebGL2/WASM runner (over optionalegfx-browserwith pure-Elisp COOP/COEP localhost server), and global mute/hide.
Relationship with ETAF
Section titled “Relationship with ETAF”Emacs GFX has zero dependency on ETAF. It is built for all Emacs users (stock Emacs, Doom Emacs, Spacemacs, Org-mode workflows, and custom packages). ETAF optionally consumes egfx when present on load-path for GPU-accelerated canvas widgets, hardware video overlays, and real-time game rendering.
Quick Installation
Section titled “Quick Installation”Clone the monorepo (recommended for development) or individual standalone repositories:
git clone https://github.com/emacs-gfx/emacs-gfx.gitcd emacs-gfxmake nativemake checkAdd the packages to your Emacs init.el:
(add-to-list 'load-path "/path/to/emacs-gfx/packages/egfx")(add-to-list 'load-path "/path/to/emacs-gfx/apps/egfx-browser")(require 'egfx)(require 'egfx-browser)Build Prerequisites
Section titled “Build Prerequisites”- macOS: Xcode Command Line Tools (
Metal.framework,CoreText,WebKit.frameworkship with macOS). - Linux: C11 compiler (
gccorclang) and Emacs 29.1+ headers. Vulkan, Pango, GdkPixbuf, and WebKitGTK are loaded dynamically viadlopenat runtime — no-devgraphics headers are required. - Windows: MinGW-w64
gccand Edge WebView2 Runtime (preinstalled on Windows 10/11).
Verify Installation
Section titled “Verify Installation”Inside GUI Emacs, run:
M-x egfx-doctorM-x egfx-browser-doctorBoth commands inspect GPU acceleration, display scale factor, < 1 ms OS pipe wakeup, and dynamic module availability.