Repolode
elixir-crab

elixir-crab/gpui

An Elixir library for building native desktop apps with declarative UI rendered by the Rust-based GPUI framework.

Stars
118
Forks
4
Open issues
12
Last commit
4 days ago

What is it?

GPUI lets developers write native desktop applications in Elixir. Application state, window layout, and UI declarations stay in Elixir, while Rust handles the native event loop, windows, rendering, focus, IME, and accessibility. UI is written with HEEx-style templates, and pointer, keyboard, and accessible activation events return to Elixir through a typed event path.

The same declarative application can run against a local native display, a deterministic test display that needs no display server, or a remote display on another machine. Conventional controls come from the separate gpui_components package, which is backed by gpui-component. Precompiled NIF archives are provided for Linux, Apple silicon macOS, and x86-64 Windows.

The repository is a Mix umbrella with the gpui, gpui_components, and gpui_native packages, along with examples such as a rich text transcript, a BEAM runtime dashboard, and a component gallery.

Key features

  • 01Declarative UI written with HEEx-style templates in Elixir
  • 02Native windows, focus, IME, and accessibility handled by Rust and GPUI
  • 03Deterministic test display that runs without a display server
  • 04Remote displays that keep the authoritative session on another machine
  • 05Persistent native text editing with UTF-16 positions, undo/redo, and IME
  • 06Virtualized collections and selectable rich text

Use cases

  • Building a native desktop tool or dashboard on top of an existing Elixir/OTP system
  • Writing UI tests for Elixir desktop views without a display server
  • Running a Elixir-controlled application whose windows are shown on another machine
  • Adding conventional controls such as buttons and forms to an Elixir desktop app

Quick start

  1. 1

    Clone the repository

  2. 2

    Fetch dependencies

    mix deps.get
  3. 3

    Run the hello window example

    RUST_FONTCONFIG_DLOPEN=1 mix run apps/gpui/examples/getting_started/01_hello_window.exs

Things to know

  • Precompiled native binaries cover only Linux, Apple silicon macOS, and x86-64 Windows.
  • Native display features need a local display server and platform prerequisites.

In collections

Topics

FAQ

What is gpui?
An Elixir library for building native desktop apps with declarative UI rendered by the Rust-based GPUI framework. GPUI lets developers write native desktop applications in Elixir. Application state, window layout, and UI declarations stay in Elixir, while Rust handles the native event loop, windows, rendering, focus, IME, and accessibility. UI is written with HEEx-style templates, and pointer, keyboard, and accessible activation events return to Elixir through a typed event path.
Is gpui free to use? What license does it have?
gpui is open source under the MIT license. Check the license terms before using it in commercial products.
Is gpui still maintained?
Actively maintained. The last commit to gpui was on Nov 3, 2026.
What can I use gpui for?
Building a native desktop tool or dashboard on top of an existing Elixir/OTP system Writing UI tests for Elixir desktop views without a display server Running a Elixir-controlled application whose windows are shown on another machine Adding conventional controls such as buttons and forms to an Elixir desktop app
How do I install gpui?
Clone the repository Fetch dependencies: mix deps.get Run the hello window example: RUST_FONTCONFIG_DLOPEN=1 mix run apps/gpui/examples/getting_started/01_hello_window.exs
Where can I get gpui?
The source code and installation instructions are on GitHub: https://github.com/elixir-crab/gpui

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects