Skip to content
IzonIcyPublic

About

GPU-accelerated terminal emulator written in Rust (egui + portable-pty)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Lumi-Term

CI

A terminal emulator written in Rust. GPU-rendered, real PTY shell, VT parsing via the vt100 crate. I wanted to understand how terminals actually work — the whole stack from keystroke to character appearing on screen. Building one seemed like the best way to learn. It's not xterm-level complete but it runs a real shell, renders via the GPU, and handles most common escape sequences.

How it works

PTY process ──→ Rust core (VT parsing, screen state) ──→ egui rendering (C FFI bridge supplies tab/window chrome state)

The PTY spawns whatever shell you have set, reads its output, and parses escape sequences into screen state that egui renders. A small C bridge carries tab/window chrome state across the FFI boundary; it's compiled at build time by Rust's build script.

Run it

cargo run

Opens a terminal window connected to your default shell.

Run it

  • Cmd+Ctrl+F opens scrollback search, Cmd+T opens a new tab, Cmd+Shift+W closes the active tab.

Config

On first launch it creates a TOML config at:

  • macOS: ~/Library/Application Support/com.lumi.lumi-term/lumi-term.toml
  • Linux: $XDG_CONFIG_HOME/lumi-term/lumi-term.toml
[window]
title = "Lumi-Term"
width = 1280.0
height = 760.0

[terminal]
font_size = 16.0
scrollback = 10000
shell = "/bin/zsh"

[theme]
background = [17, 17, 17]
foreground = [233, 233, 233]

Code

src/
├── main.rs           # entry point
├── app.rs            # event loop, frame timing
├── pty.rs            # PTY spawn, I/O, session lifecycle
├── config.rs         # TOML loading
└── chrome_bridge.rs  # C FFI declarations

native/
├── lumi_chrome.c     # tab/window chrome state bridge
└── lumi_chrome.h

Build

cargo build --release
cargo clippy

Requirements

Rust toolchain, C11 compiler (for the bridge), macOS 12+ or Linux with Wayland/X11.

About

GPU-accelerated terminal emulator written in Rust (egui + portable-pty)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages