o
odin.langpkg.dev
packages / library / oui

oui

b59617blibrary

No description provided.

No license · updated 1 month ago

ou - Native Metal Terminal Emulator

A terminal emulator for macOS built with Odin and native Metal rendering.

Features

  • Native macOS Metal rendering (no OpenGL/SDL2 dependency)
  • PTY (pseudo-terminal) support for shell integration
  • ANSI escape sequence parsing
  • Instanced rendering for efficient terminal cell drawing
  • Real-time font texture rendering

Building

Requires Odin compiler with dev-2026-05 or later for Metal bindings.

odin build src/main.odin -file -o:none -target:darwin_arm64 -out:ou

Architecture

  • src/main.odin - Application entry point, NSApplication window setup
  • src/pty/pty.odin - Pseudo-terminal handling via posix_openpt
  • src/term/terminal.odin - Terminal state and ANSI escape parsing
  • src/render/renderer.odin - Metal renderer with instanced rendering
  • src/render/font.odin - Font texture generation
  • src/render/shaders.metal - Metal shaders for terminal rendering

Usage

Run the compiled ou binary. It spawns a shell (from $SHELL or /bin/sh) and renders output using Metal.