r/lua • • Oct 15 '26

Library Ito: A Declarative TUI library in Lua

https://uji.sh/ito

I've always loved the idea of JIT-compiled UIs. TempleOS is a fascinating example, using JIT-compiled C to build its UI.

Recently, I've been working on a TUI project where almost everything is customizable at runtime, from the UI itself to the core functionality. I wanted a way to build terminal UIs declaratively, similar to SwiftUI, while keeping the flexibility of runtime customization.

So I built Ito a Lua library for writing JIT-compiled TUIs.

To make it easy to experiment with, we also built a fake TUI canvas in the browser where you can try out Ito live. Give it a try!

38 Upvotes

8 comments sorted by

2

u/bjazmoore Oct 15 '26

I followed the link but don't see anything about a TUI library.

2

u/dracarys_18 Oct 15 '26

The link points to a TUI canvas we made for the web where you can try out the TUI library easily. You can make changes in the code palette and it should reflect in the canvas

2

u/Old_County5271 Oct 15 '26

So this is luajit only?

2

u/dracarys_18 Oct 15 '26

Not LuaJIT only you can build it for PUC Lua too with this command

```
cargo build --release --features module,lua54
```

2

u/HeavyCaffeinate Oct 15 '26

Your forgot to enter markdown mode

2

u/dracarys_18 Oct 16 '26

My bad xd. Just a muscle memory before entering commands

0

u/kaisoma Oct 15 '26

this is amazing, i needed this since forever