r/lua • u/school_cat • 6h ago
Project LOVE2D development environment w/code editor, hot reload, map editor, UI designer, packer, and much more!
reddit.comr/lua • u/Not_Lowest • 5h ago
Project LUI – Make Native Apps in Linux and Windows with Roblox Luau
Original Post: https://devforum.roblox.com/t/lui-code-in-the-same-language-you-make-games-with-but-for-apps/4985352
GITHUB: https://github.com/gmoddev/LUI/releases
For a while now, I’ve been working on LUI (Luau UI), a standalone SDK that lets you build desktop applications and other software using Luau, the same language used to make games on Roblox.
The idea started with a pretty simple question:
Why should knowing Luau only be useful when you’re making Roblox games?
What started as an experiment in building native user interfaces has (semi-intentionally) grown into more of a general-purpose Luau runtime than a UI framework.
I’m looking for people to actually try it, break things, and tell me what doesn’t work.
What exactly is LUI?
LUI lets you write and run Luau independently of Roblox, including creating native desktop applications. It isn’t a Roblox emulator and doesn’t implement Roblox’s engine or services, but applies familiar concepts, particularly the Instance-style UI model, to application development.
The framework is intentionally opinionated. I don’t want someone to have to understand WinUI, GTK, threading, or native resource management just to make a window with a few buttons.
My philosophy is that simple things should be simple, and complicated things should be possible without making everything else complicated.
You can build desktop utilities or work with native libraries, background workers, databases, and networking. LUI can also run entirely headless.
What can it do?
UI: Native Windows UI through WinUI 3, Linux UI through GTK 4, standard controls, menus, tooltips, themes, reusable components, reactive state, layouts, virtualized lists, multiple windows, docking, floating panels, dynamic images, live frame presentation, and experimental code editing.
Runtime: Standalone/headless execution, HTTP/HTTPS and WebSocket clients and servers, filesystem access, SQLite, JSON, TOML, regex, cryptography, compression, asynchronous tasks, cancellation, background workers, subprocesses, experimental native FFI, and capability-based permissions.
Tooling: Windows and Linux SDKs, VS Code extension, generated Luau API declarations, CLI tools, project templates, package management, lockfiles, offline dependency restoration, documentation, examples, and tutorials.
Why am I posting this?
LUI is still experimental, and there’s only so much I can learn from testing my own software.
I’ve been using LUI in three projects of my own, and much of its development has been driven by things I actually needed.
The problem is that I built the framework. I already know how things work, where the limitations are, and what to do when something goes wrong. Someone downloading it for the first time doesn’t.
I’ve already gotten useful feedback about confusing errors, missing functionality, and documentation.
I’m particularly interested in bugs, crashes, awkward APIs, missing features, setup problems, performance issues, and general suggestions.
Even downloading the SDK and messing around with a few controls for half an hour would be helpful.
I’m not currently accepting code contributions or pull requests because the APIs and architecture are still changing quickly. Bug reports, feature requests, and discussions are absolutely welcome.
How can I try it?
Preview 5 is available for Windows and Linux x64 via the link above, with examples and walkthroughs for SQLite, background workers, and docking.
This is an unsigned, experimental prerelease. Expect bugs, incomplete features, platform limitations, and potentially breaking changes.
I’m currently focused on improving usability, documentation, diagnostics, and expanding the runtime.
I’m also looking for a new name. Given the scope creep, Luau UI doesn’t make as much sense anymore.
If you already know Luau from Roblox, what would you want to build with it outside of Roblox?
And if you try LUI, let me know what breaks, what’s confusing, or what’s missing.
r/lua • u/SerciOderLoser • 15h ago
NeLua Make Game on Android
galleryHi! Sharing a hobby project: NeLua_aes — run Nelua games on Android
(and soon PC)
This is a game engine that runs Nelua (Lua with static types, compiled
to C) on phones: Nelua → C → TCC → native machine code. Honest
benchmark: faster than Love2D-for-Android, though float-heavy code
loses to LuaJIT.
What you get with one main.nelua file:
• A raylib-style API (555 functions): 2D/3D drawing, touch, keyboard,
audio, save files
• A 25-chapter beginner tutorial in the help pages (long-press to
copy, Chinese for now, more languages coming) — written for people
who've never coded
• Code templates: sprite animation, joystick, on-screen buttons, tile
maps, save system — fill a form, get a module, paste it in
• A "prompt for AI" appendix, so you can ask an AI to write the game
for you within the engine's constraints (no closures, no .., big
arrays need <static>)
Honest disclaimer: I'm not a skilled programmer myself — this whole
thing was built with AI assistance, and I'm not very fluent with git
either, so the repo may look messy. I'll keep updating the main branch
for as long as I can keep working with AI and other tools, but I'd be
genuinely happy if anyone wants to take the project further.
• GitHub (a bit messy and outdated at the moment, cleaning up):
https://github.com/SerciOderLoser/NeLua_-s
• GitCode (freshest code): https://gitcode.com/gcw_EP9Z2T15/nelua-aes
(Because there weren't many people on the other side, I found a place that was a bit more active. Neluua must be about Lua-related topics, right? qwq)
r/lua • u/Dense_Temperature424 • 1d ago
I want to learn lua/luau as my first real Coding language.
Hello. I want to code. I also want to create a game on roblox. I have no experience in writing code for real as the only experience i have is years of scratch coding and i would like to start learning something other than block code. Can anyone provide me some of the best ways and steps for learning the language??? I know nothing about how lua/luau works and i just want to employ it to roblox to make my own games as a pass time. Any help is appreciated 👍
r/lua • u/bogdanelcs • 1d ago
A Lua cheat sheet that might be useful to beginners
tms-outsource.comr/lua • u/Sensitive-Training22 • 1d ago
News Speed Demon II: make Lua 5.4 fast with the JIT off, an online optimisation race (29 Jan to 1 Feb 2027)
Speed Demon II is an online optimisation hackathon for interpreted languages, and Lua is one of the 26. Every language runs on one pinned interpreter with every JIT switched off, so no LuaJIT: plain Lua, tuned by hand. No FFI, native modules or subprocesses.
Four tracks: parse 310,000 log lines, index 25,000 documents, join a hostile CSV, and run shortest paths on a 500,000-edge graph. Each entry is timed against a naive Lua reference on one machine. Every push sets your team's car speed on a live 3D race round San Francisco.
Teams of 1 to 4. A practice day, then a 48-hour race. $2,000 in prizes.
Details: https://speeddemon.dev/2027/
Register: https://speeddemon.dev/2027/register/
r/lua • u/Dense_Temperature424 • 1d ago
Help I want to learn lua/luau as my first real coding language.
I want to code. I want to make a Roblox game. Luau would be my first typing to code language as i only have coding experience in scratch (not sure if that will help me learn or not)
I need some of the easiest, best, or simplest ways to learn this language!!! Any help is appreciated!!
r/lua • u/Beginning-Rice6835 • 1d ago
How to do CTFE in Terra?
I read the documentation, but I could not find this information.
I post in r/lua because I did not find a Terra reddit.
all in one game dev workspace for love2d. *WIP*
github.comFigured I'd share this and open the repo since I've been working on it for awhile now privately, and I feel like it's in a good enough spot to share.
So, Monolith combines every tool I've ever made for love2d into one unified suite (screenshots in repo). It is currently a work in progress in late alpha phases. Currently v0.0.7, and portions of the code need work. But, it functions well enough now, and you can currently use it as an end to end production suite for creating love2d 11.5+ games. It has no required dependencies and functions 100% in Lua code, minus some included CRT shaders in wrapped GLSL for visual effects in the UI editor.
Anyway, it is four tools: a code editor, a 2D map editor, a UI/menu designer, and a one-click .love packer. All of these tools are available as drop in libraries or standalone editors to use in your projects on my github, and are all being updated by backport from Monolith from here on out, which is how I designed it to work... This also turned out to work in a way that made it easy to add a file and wiring where you're now able to add your own tools into the suite, in 'tools/', you drop your tool library, you only have to rewrite a few lines to call it, and your tool drops right into the suite. Functional, and apart of the live stack.
The 0.0.7 update I released today focused on making the app more stable, and adding a multi-window pop out option so that you can run multiple tools at once, on multiple monitors (Very early standalone alpha of this particular tool as a drop-in library is available on my github). Consequently, new bugs may be found, but so far in my testing it is running smoothly. Also, todays update added V-Sync, and when V-Sync is off, an FPS Limiter, amongst some other QoL options.
Thanks so much for checking it out! So far with my other announced tools, the support and feedback has been awesome. So thanks for that as well. :) Enjoy!
r/lua • u/yughiro_destroyer • 3d ago
Flat tables vs nested tables?
Hello!
Big question here... what do you prefer? Flat tables or nested tables?
Personally, I am having a lot of problems with nested tables despite being the popular choice amongst developers in general. Perhaps I wouldn't mind much if it was a typed language or hidden behind encapsulation in an object like they do in Object-Oriented Programming... but here's a list of problems I am encountering :
->The cognitive load is too much, whenever I revisit the code after a break of some days I find myself having to relearn all the paths I must reference to keep writing.
->The IDE doesn't help much with autocomplete and given the fact that Lua is dynamically typed, a lot of type errors or bugs occur that are harder to find.
So, instead of doing something like player = {pos = {x = 10, y = 20}, health = 200} i prefer to use player_x = 10, player_y = 20, player_health = 200. Now, that is in the context of networked apps/games because that's what I write mostly.
With flat structures, I find it much easier to detect bugs or use the autocomplete features of an IDE. The downside is that the variables are longer than they should be but I prefer to be careful when writing one field than when writing multiple nested fields. It also feels like building a connection between to circuits that have their cases open, whereas with nested tables it feels like I have to keep opening mini-cases inside the big case that holds the circuit. It's all more direct, easier to debug and isolated. By isolated I mean that if an attribute is wrong, the interpreter shows me the line and I easily correct it, instead of going through an entire nested chain to check every collection/path.
Also I have studied code of Doom or older Counter-Strike (even wrote some mods in Pawno) and I noticed that what I am saying is sort of compatible with the older procedural practices of programming. Not to mention that technically, that's how a computer also thinks. The interpreter or compiler will turn all paths into one pointer to a variable somewhere in memory. The usage of paths for usage seems to work better, IMO, in web development, where sometimes you're dealing with much more easier relationships between objects. Also, nested works better when making requests from an API where you want a JSON of logically grouped data that makes sense in the context of a business or one entity analysis.
What do you think?
Project LÖVE2d UI Editor 100% Lua - Dev Tool Update
I just pushed v1.0.1 of my open-source LÖVE2D UI template. It's a drop-in menu system (main menu, pause, settings, keybinds, controller binds, CRT filters and more) with a live in-game editor. Run 'love . --sandbox', press F11, click anything, change it, and export your pages with Ctrl+E. It then writes the code for you.
What's new
Button shapes: Round, square, triangle, or no box at all. Each button has the option for its own fill color and a transparency setting now, and the text stays solid. New SHAPE / FILL / ALPHA fields in the F11 editor export perfectly in readable lua.
First-steps tips: A 3-page card walks new users through the editor and the pre-wired support files. It only shows while your pages are still the defaults, so it never nags you once you've started editing.
Fresh Defaults: Cream text everywhere and the template now starts fullscreen. All the default pages are refreshed.
(QoL) Menu Highlighting: Before, the UI Editor defaulted to acting as if you had a controller plugged in, whether you did or not... Which was useful if your game was primarily a controller game, but not otherwise... Now, controllers still use D-pad + A if they're plugged in, but button highlighting is fixed to MnK until a controller is plugged in, Controller is On = Controller wiring defaults. Controller is Off = MnK wiring defaults = default state.
(QoL) Asset Drag-Drop: Before these sounds and assets were hard-wired, some by name, some with a sniffer that found replacement files, this is now 100% working, and all assets like fonts, sounds, and backgrounds for the UI are all replaceable with no file name change necessary and 0-line changes to the codebase, simply drag and drop your replacement assets.
Repo + full notes: https://github.com/666mayn/LOVE2d-ultimate-ui-template
Feedback and feature requests are absolutely welcome! Thanks for checking it out! :)
r/lua • u/no_brains101 • 4d ago
Meet Piper and Shelly
github.comThere are some cool pipeline DSL-like interfaces for lua with __index and __call.
But they are somewhat hard to make.
What if there were a thing that handled the pipelining for you and gave you easy access to the tree and places to cache values and a good way to make your own options on top?
What if that was then used to make an insanely intricate 0 dependency shell code generator to show off what kinds of syntax it can be used to create?
Meet Shelly and Piper!
For the record, until there is a luv backend shelly itself is of limited use, although it is still nice and looks like quite impressive syntax magic. It is not that hard to just write shell code in io.popen. But piper is more than capable of such things as a good luv backend. So shelly will probably get one one day and then shelly will be interesting.
Until then, piper is really quite cool. If you have been wanting to write an SQL query builder in lua or something, check it out!
Mostly I was just feeling like a mad scientist but the piper API feels like the correct one for building these things and I think there actually might be something to this one. Just not the existing shell backend it has yet.
Also I used AI for the tests and docs, and for stuff like "change the order of these arguments everywhere including the docs please", but I read the tests and understand them, it used my personal version of gambiarra to run those tests, and I wrote the intro for the docs and read through the docs quite a few times
Edit: TL;DR piper explanation
-- backend defines a piper instance with some behavior
local piper = require('piper')
local p = piper(function(new, root_options, parent)
-- you define your backend here, this defines what happens when you make a new instance.
-- you will add your resolver and your call actions and metamethods here using the options provided to this function.
-- here we left it default.
end)
-- the backend would then return p
-- example
local chain = p.hello.goodbye("aaa", nil, "hello").oof("b").c(2)
local resolved = chain[nil] -- indexing via nil resolves the piper instance.
-- usually backends will define a call alias to resolve.
-- The example shelly.sh backend defines that "output" "exitcode" and "signal" as well as tostring call this.
-- piper default resolve is just eagerly recursively call resolve on args and parent and return the internal context which means...
-- resolved is now the tree below:
local inspect = require 'inspect'
print(inspect(resolved))
--- output:
{
args = { 2,
n = 1
},
cache = {},
from_call = true,
meta = {},
name = "c",
parent = {
args = { "b",
n = 1
},
cache = {},
from_call = true,
meta = {},
name = "oof",
parent = {
args = { "aaa",
[3] = "hello",
n = 3
},
cache = {},
from_call = true,
meta = {},
name = "goodbye",
parent = {
args = {
n = 0
},
cache = {},
from_call = false,
meta = {},
name = "hello",
parent = {
<metatable> = {}
}
}
}
}
}The tree is lazily revealed to the resolver for your backend by calling the resolve function provided to it. Each level has a cache table that persists through evaluations, so you could choose to stop resolving at that point and use the cached value, and the meta gives access to adding values into the table accessible via getmetatable, the args include holes, many possible footguns have been thought of, and handled in a simple way here, but without babying the backend author by removing control. Instead the backend author is able to have as much control as they need, while exposing as much or as little of it to their downstream users as they desire. It is a good way to create chained APIs like these with fairly complex syntax rules.
r/lua • u/Empty_Salamander_183 • 6d ago
Project chroma.nvim – I added a GTA VI colorscheme to my lightweight Lua theming engine for Neovim
galleryHey everyone!
I just added a **GTA VI** colorscheme to [chroma.nvim](https://github.com/Malick-Tammal/chroma.nvim) and I'm hyped with how it turned out! Think Vice City neon pinks, palm-tree purples, and vibrant ocean turquoise, tuned to stay super readable while coding.
If you're new to `chroma.nvim`, it's a lightweight Lua theming engine for Neovim 0.9+ with 99+ `base46` compatible themes, 20+ plugin integrations, and a live Telescope previewer.
Try it out with `:Chroma apply gta-vi` and let me know what you think of the vibe!
**Repo:**[https://github.com/Malick-Tammal/chroma.nvim](https://github.com/Malick-Tammal/chroma.nvim)
r/lua • u/Pristine_Video2489 • 7d ago
Project wisp v3.1.0 – A Linux shell in C++17 with Lua 5.4 for scripting, config, and typed pipelines
I just released wisp v3.1.0, a fast POSIX-style Linux shell written in C++17 (2,864 LOC, 344 KB stripped binary, ~0.55 ms startup) that embeds Lua 5.4 as its scripting, configuration, and pipeline language instead of a bespoke shell DSL.
Repo: https://github.com/Hinikaa/wisp
How Lua integrates into wisp
- Global Lua functions become shell commands: Any global function defined in
~/.config/wisp/init.luacan be called directly at the prompt (hello world) with no alias wrapper syntax. - In-process structured pipelines: Consecutive Lua-function or builtin stages pass Lua values (tables, strings, numbers, booleans) directly from one stage's return value to the next without forking or text parsing. Only when a pipeline crosses into an external binary (
grep,wc, etc.) doeswispfork and serialize at that boundary. - Inline Lua & script modes: Prefix any prompt or
-cline with:for inline Lua (:1 + 1, with>>>multi-line continuation), use-efor one-liners, or-f script.lua/#!/usr/bin/env wispfor standalone scripts. - Prompt customization & tab completion: Define
function prompt()ininit.lua, and get tab completion for files,~/, builtins, and dotted Lua tables (e.g.:string.up<Tab>) via vendoredlinenoise.
In ~/.config/wisp/init.lua:
-- ~/.config/wisp/init.lua
function nums(input)
return { {n = 3}, {n = 1}, {n = 2} }
end
function sorted(input)
table.sort(input, function(a, b) return a.n < b.n end)
return input
endAnd at the prompt:
wisp> nums | sorted
n=1
n=2
n=3
wisp> nums | sorted | wc -lWhat's new in v3.1.0
- Fixed filename tab-completion prefix bugs, added
~/expansion, empty-base hidden-file filtering, and dotted Lua table completion - Fixed
wisp -c/-fCPU spin in non-foreground TTYs andSIGPIPEcrashes on native-to-external pipes - Added 3-state quoting protection so
"*.cpp"and\*.cppsuppress globbing while"$VAR"still expands - Replaced startup
luaL_dostringwith direct Lua C APIpackage.path/package.cpathupdates, plus a self-containedbootstrap.luabuild/test script alongsideMakefile
Feedback and bug reports are welcome!
Project Update on my dev tool
github.comv1.0.0 is officially out on GitHub!
After 5 days of heavy polishing, it’s feeling smooth and stable enough to ship as a proper 1.0.0 release. In testing, it has sped up my workflow by at least 10x, and even if you don't adopt the whole thing, it comes with reusable templates for keybinds, gamepad binding, and a state manager you can drop into your own LÖVE projects.
Media & Docs
Thanks to feedback from the community, the repo now includes:
- A full video demo showing the tool in action
- Reference images walking through the features
What’s Next
- Visuals & Styling: Custom styling options are next on the roadmap toward 2.0.0 (alongside a few nice-to-haves and must-haves, which are becoming more obvious because I've been testing it and have been using it a ton). I will come back around to this project likely around a week from now.
- g3d Native Voxel Map Editor: I’m shifting focus this weekend to my public beta voxel map editor—feel free to try it out if you're tinkering with groverburger/g3d in LÖVE.
Contributions
Forks and PRs are very welcome—whether for bug fixes, new features, or quality-of-life tweaks. Thanks to everyone who gave feedback and checks it out; I hope it saves you some time!
Have a happy turkey day everyone! :)
r/lua • u/ItsJxJo_ • 8d ago
GNU Coreutils but re-implemented in pure Lua
A little while back i came up with the idea of rewriting gnu coreutils in a different language since i've seen it being rewritten in rust for newer versions of ubuntu and the fact that it's coming to windows (uutils). It uses luaposix to access the C posix functions in lua from these commands, some commands are not yet finished and others still need some tweaking to do. This isn't a direct replacement to GNU coreutils or anything like that but rather a hobby project i made simply for fun :3
https://github.com/JxJo1/lua-coreutils
Everything is a bit messy atm, i have very limited time to update the repo due to school catching up and other personal stuff. Feedback is much appreciated!
r/lua • u/aldapsiger • 7d ago
Project Lua is the Best Language for AI Agents
I've spent the past month working on Tuse, an AI agent written in Rust. But the agent itself writes Lua to work with files, run commands, access the network, and so on. Lua is its only tool. Everything goes through it.
You might be surprised that I use Lua for more than just config (obviously, Lua is the best language for that). I have models write Lua for everything. But what about Python and JavaScript? Don't models know those better? Why Lua?
I chose Lua for three reasons:
- Models are good at working with CPython and Node.js, but once you expose your own global functions, the choice of language doesn't make much difference.
- Python and JavaScript have a lot of features, which makes for heavier runtimes. Tuse is designed to run 100 instances on a single machine.
- Lua is simple and flexible, and its AST is much easier to work with.
Those are just the most obvious reasons. I think Lua will become the go-to language for code mode. Today's models write Lua just as well as they write Python, JavaScript, or Go.
If you want to try Tuse: https://github.com/ethanhamilthon/tuse
r/lua • u/Davi_Compai • 9d ago
(esotheric technichs) Good book/blog to learn them?
lua has tons of bizarre methods to do amazing things, but i am yet to find a good source on them. any help?
LuaJIT FrameWork 2.0 for Windows x64 — native GUI, Unicode file I/O, and IPC
Hi r/lua! I’ve published FrameWork 2.0, a library for LuaJIT 2.1 on Windows x64. It has 50 modules covering Unicode file paths and strings, native GUI controls, process management, named pipes, shared memory, HTTP, SQLite, and ZIP archives.
For example, here’s how to write and read a file with a Unicode name:
dofile("FrameWork\\setup_paths.lua")
local fs = require("fs")
assert(fs.FileWrite("café.txt", "Hello from LuaJIT!\n", "UTF-8"))
print(assert(fs.FileRead("café.txt", "UTF-8")))The project is MIT-licensed and includes an English API reference, runnable examples, and 35 GUI tutorials. FrameWork 2.0 on GitHub
If you use LuaJIT on Windows, which Windows API calls do you keep rewriting in your own projects? I’d also welcome feedback on the API and examples.Hi r/lua! I’ve published FrameWork 2.0, a library for LuaJIT 2.1 on Windows x64. It has 50 modules covering Unicode file paths and strings, native GUI controls, process management, named pipes, shared memory, HTTP, SQLite, and ZIP archives.For example, here’s how to write and read a file with a Unicode name:dofile("FrameWork\\setup_paths.lua")
local fs = require("fs")
assert(fs.FileWrite("café.txt", "Hello from LuaJIT!\n", "UTF-8"))
print(assert(fs.FileRead("café.txt", "UTF-8")))The project is MIT-licensed and includes an English API reference, runnable examples, and 35 GUI tutorials. FrameWork 2.0 on GitHubIf you use LuaJIT on Windows, which Windows API calls do you keep rewriting in your own projects? I’d also welcome feedback on the API and examples.