`dabeob`: a simple TUI lib for Zig

dabeob:


After investing not too less hours of my free time over the last weeks into writing my own TUI lib, it’s now in a first presentable alpha state; as already reported in the “Whats everybody working on” thread.[1][2]

The main inspiration was to replace the LLM/AI-powered TUI lib of my primary hobby project lui with handwritten code. Since the latter is only made out of fun, I want it to be mostly my own crafted code.

In contrast to many other TUI libs (not only the Zig ones) dabeob offers no enhanced “Widget” system with predefined widget sets like “lists”, “bars”, “tables” etc. The main focus is on wrapping the low level stuff (setting up terminal, fill col/row grid, double buffer grid for efficient writing) and offer a simple but easy to understand interface for printing styled chars to the terminal at specific locations. Because in the end thats what every elaborated widget also does: printing styled chars to stdout.

The repo has a simple example showing a plain list, some boxes and text input field:

So far, it works good enough that I already replaced the TUI dep in lui with dabeob.

Since the state is far from perfect, expect bugs and breaking changes :grin:

Supported Zig versions

0.17.0


  1. What's everybody working on? (October edition) - #61 by lukeflo ↩︎

  2. What's everybody working on? (October edition) - #70 by lukeflo ↩︎

16 Likes

dang, the directory/file list looks great
i’m not a tui guy myself, but that’s captivating, not gonna lie :heart_eyes:

1 Like

I love that. Many libraries do too much stuff for me. Part of the tui appeal for me is that the limitations of the environment force you to think outside the box in terms of design, and you’re not just declaring widgets very abstractly.

Restrictions lead to creativity.

My favorite kind of library is exactly one that wraps only the low level stuff, and then the rest is up to me.

1 Like