Re: [ANN] cross terminal terminal library for Lua released
"Pierre Chapuis" <[email protected]> Mon, 08 Jun 2026 10:12:54 +0200
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks, I have a small tool using it that was built with an old version, upgrading was painless (just had to remove the `.stack` accessors removed in PR 216). https://github.com/catwell/multimodal/commit/f58cda640d3bde8d69bb75aa5232680d465f5f9d -- Pierre Chapuis On Sun, Jun 7, 2026, at 22:18, 'Thijs Schreijer' via lua-l wrote: > List, > > happy to announce that I have finally released the first version (0.1.0) of the `terminal` library <https://github.com/lunarmodules/terminal.lua>. It is a cross-platform terminal library *_supporting *nix and bsd variants, and Windows, and Lua versions 5.1 to 5.5_*. Some 18 months ago I announced its existence <https://groups.google.com/g/lua-l/c/JOwxp1k4Y_E/m/9JkM_XJFBwAJ>, lots of high-level functionality has been added since. First commit was 2 years ago. > > This library does not depend on external libraries (e.g. curses, ncurses, SDL and the likes). It relies only on LuaSystem <https://github.com/lunarmodules/luasystem/> (and utf8 lib for older Lua versions), this should make it a lot easier to build (especially on Windows), since LuaSystem only binds to platform APIs. So for a novice on Windows it should be easier to get this operational. A working LuaRocks installation should get anyone up and running, no fiddling required with external .dll/.so files and/or development headers to build it. > > Installation: `luarocks install terminal` > > Low-level features: > • Full UTF-8 support for emojis and other Unicode characters. Advanced string handling for UTF-8 characters as well as display columns. > • Non-blocking keyboard input; enabling coroutine based multithreading with background tasks, no more `io.read` blocking everything. (a line-editor was written in Lua to enable this). > • Core terminal functionality to setup streams non-blocking, canonical mode, etc, and ANSI control sequence support (colors, cursor movements, etc) > • Mechanisms over policies; the library will not claim the main loop, nor does it bring in an event system or require callback-spaghetti. It can be easily hooked up, but doesn't force this upon the user (this was the main issue I had with most other UI libraries) > > High-level functionality: > • CLI widgets <https://lunarmodules.github.io/terminal.lua/topics/04-cli_widgets.md.html>; selections (radio button), multi-select (checkboxes), text input prompts, progress bars and spinners, etc. > • Full-screen UIs <https://lunarmodules.github.io/terminal.lua/topics/05-fullscreen_ui.md.html>; panel system with automatic layouts, headers, footers, text panels with word-wrapping scrolling etc, confirmation dialog boxes, <https://lunarmodules.github.io/terminal.lua/topics/05-fullscreen_ui.md.html#Dialogs______ui_panel_Confirm_> tabstrip <https://lunarmodules.github.io/terminal.lua/topics/05-fullscreen_ui.md.html#Tab_strip_panel______ui_panel_TabStrip_>, and more > • Canvas; <https://lunarmodules.github.io/terminal.lua/topics/06-canvas.md.html#canvas_Viewport> unicode braille char based canvas to be used from either CLI or full-screen UIs. Drawing primitives; dots, lines, ellipses, arcs, polygons (optionally filled). It even includes a time series graph <https://lunarmodules.github.io/terminal.lua/topics/06-canvas.md.html#canvas_TimeSeriesGraph>. > > Rationale: > > Ever since I started with Lua I have wondered how to make it easier for novices (like me at the time) to get started. I still think that most will start from a Windows environment (as I did), which just makes it extra hard to get started. Just setting up a compiler and using a cli is already a challenge, let alone building stuff from source, binding to external libraries and what not. > > Hence a number of my projects have always been aimed at making it easier to get started with Lua and to enable a novice to still write a fully functional application, with a focus on cross-platform support. A Windows specific example is LuaWinMake <https://github.com/Tieske/luawinmake> and LuaWinMulti <https://github.com/Tieske/luawinmulti>, the former is a simple standalone Windows batch file that (given a working compiler) will build any Lua version (5.1-5.5) from source without needing `make`, `cygwin`, etc. The latter uses the former and adds a LuaRocks installation. > > I have maintained (and extended) Copas <https://github.com/lunarmodules/copas> for this purpose over the years (evolved from a socket scheduler to a generic coroutine scheduler). And with the addition of this new terminal library I feel like I'm finally closing the loop; adding UI capabilities, and non-blocking keyboard input. > > If you read this far; thanks :) > Please give it a spin, all feedback welcome. > > Big shout out to the GSoC students (selected and non-selected) for helping out adding features and fixing bugs! > > Thijs > > > -- > You received this message because you are subscribed to the Google Groups "lua-l" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > To view this discussion visit https://groups.google.com/d/msgid/lua-l/4b7fe47e-b39a-4adb-a133-356d4474b25d%40app.fastmail.com <https://groups.google.com/d/msgid/lua-l/4b7fe47e-b39a-4adb-a133-356d4474b25d%40app.fastmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/4a37046c-8d4a-4ddb-afc8-1973a5c65d1a%40app.fastmail.com.