r/lua • u/epicfilemcnulty • Feb 16 '26
Library Lilush (LuaJIT runtime & shell) first public release
Hey folks, I've been working on this project for the last 4 years, and I think it's ready for the first beta release.
Mind you, I'm pretty sure there are still lots of bugs, and lots of features are not yet implemented, but I think it's quite usable. And at this stage I'd really use some feedback.
Caveat: Linux only.
It's a statically compiled LuaJIT with a bunch of builtin libs and modules + Linux shell.
When running as a shell it has different modes:
- [F1] The shell itself
- [F2] Lua REPL
- [F3] Agent Smith -- minimal coding agent TUI
- You can write and add your own modes
Here is the landing page, the repo is hosted at Codeberg. I've even created a dedicated subreddit, and it's absolutely beautiful in its emptiness :)
Screenshot shows the builtin markdown renderer/pager(best viewed in Kitty terminal, as it supports text-sizing).
Anyway, if anyone finds this interesting, I'd be glad to provide more info/answer questions. Contributions are also welcome.
3
u/vitiral Feb 18 '26
I'm surprised by the conciceness of your markdown parser: https://codeberg.org/latimar/lilush/src/branch/master/src/markdown/markdown
Last I looked, the CommonMark C implementation was on the order of 30,000 LoC. Your parser looks to be... maybe 2,000 total? Are there missing features or is it relatively complete?
I wrote https://civboot.github.io/lua/cxt for an extendable and concise (in implementation and expression) documentation language. If I had known markdown could be done so concisely I may have never created my own -- though I am personally a fan of having more structured control with cxt.
2
u/qwyss Feb 17 '26
I am a little bit concerned ( for myself, not for you ) when you mention a special luasec with wolfssl. I'm pretty certain I just replaced openssl with wolfssl and it all just kinda worked.
What problems did you hit?
What did I miss? :)
2
u/disperso Feb 17 '26
Nice project! I've always on the look for something that it's Lua with some default extras (I find very frustrating the lack of the simplest file system access). I don't need that much stuff as your project packs, though, but the size is so small that I don't think I'd care. I'm intrigued by the terminal support, and the fact that you hint that it can "replace" busybox.
I have some questions, if you don't mind:
lit), and it's been ongoing for some time, it seems a difficult "rival" to beat if there is too much overlap.Cheers, and congrats for the project.
2
u/topchetoeuwastaken Feb 17 '26
Have you put any thought into concurrent I/O (performing two or more IO operations at the same time)? lua, although single-threaded, is a fantastic candidate for this, as it supports coroutines, which means that a single lua thread can be suspended until the IO operation it is performing is completed, giving CPU time to other threads, and even letting them perform other IO operations on their own.
On another note, I've been experimenting with it for a while (see tal and libev), and so far, it works great, with some caveats (performance so far is not the best, you can't yield in some places you'd expect, despite luajit's promises of a fully yieldable interpreter). Despite that, at this stage, I can comfortably host an HTTP server with the "runtime" I've made.
If you like what you see, you could take some of my logic for concurrent IO for your own project.
2
u/vitiral Feb 18 '26
We have similar almost entirely tangential projects: https://civboot.github.io.
You seem most focussed on networking, whereas my focus is on a developer tech stack from scratch. Nice to see more Lua stuff.
FYI you may be interested in the https://civboot.github.io/lua/fd.html module, which gives async IO.
5
u/Dimensions_forever Feb 16 '26
i am the linux, i will install
4
u/Clear_Inevitable_718 Feb 17 '26
This is awesome wtf 😠I'm gonna try it
3
u/-nixx Feb 17 '26
Great work! Post it in lua mailing list as well.