Skip to content
/ mold Public

A high-performance TUI library with a Zig core, SolidJS frontend, and blazingly fast flexbox-like layouting.

Notifications You must be signed in to change notification settings

Adictya/mold

Repository files navigation

Mold

A high-performance TUI library with a Zig core, SolidJS frontend, and blazingly fast flexbox-like layouting.

⚠️ Alpha Software - This is a first working proof-of-concept. Nothing is finalized.

HMR.Showcase.mp4

Features

  • Zig-based core exposed via Node API using napigen
  • SolidJS with HMR for reactive UI development
  • Node and Bun compatible runtime support
  • Blazingly fast flexbox-like layouting powered by Clay and zclay
  • Wide range of terminal features thanks to libvaxis (not yet exposed/used but can easily be added):
    • RGB colors, hyperlinks, bracketed paste
    • Kitty keyboard protocol, fancy underlines
    • Mouse shapes, system clipboard, notifications
    • Images via kitty graphics protocol

Future Plans

  • ShadCN-like UI library - Fully customizable and themeable terminal-first components with shadcn CLI support
  • DOM-like API - Handle input/scrolling/dragging in Zig core with optional JS hooks
  • Zig-based animation library - Native performance animations
  • Event bus framework - Bubbles/libvaxis-like event system for component communication without prop drilling
  • Declarative routing - Built-in routing system

Project Structure

  • ./native - Zig core library
  • ./examples/solid-test - Example SolidJS application
  • ./packages/core - Core TypeScript/SolidJS bindings

Quick Start

Development (with HMR)

Requires Bun and Zig installed.

bun run build:native
bun install
cd examples/solid-test
bun run dev

Production Build

cd examples/solid-test
bun run build
node ./dist/index.js

Acknowledgements

This project builds on the excellent work of:

  • Clay by Nic Barker - High-performance 2D UI layout library
  • zclay by johan0A - Zig bindings for Clay
  • libvaxis by rockorager - Modern TUI library for Zig
  • napigen by cztomsik - Comptime N-API bindings for Zig

License

MIT

About

A high-performance TUI library with a Zig core, SolidJS frontend, and blazingly fast flexbox-like layouting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published