You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. https://luau-lang.org
Lupa should have support for Luau. Luau's C APIs have some variations. There is not currently a documented list of these changes, but this GitHub issue is tracking that: luau-lang/luau#251
If this can be done (mostly) via C macros, and doesn't add too much to the maintenance burden, and assuming that luau is not just someone's hobby language but something that is actually being used (I had never heard of it myself), I wouldn't object to looking at a PR. Once there is a working implementation, this can be added to the list in #196
Up, Luau is a great variation of Lua, It was made by Roblox and is the current language for scripting, The best features are probably the typing and that it runs JIT (just line LuaJIT) and it's very fast and continuously being maintained
Up, Luau is a great variation of Lua, It was made by Roblox and is the current language for scripting, The best features are probably the typing and that it runs JIT (just line LuaJIT) and it's very fast and continuously being maintained
Luau doesn't run JIT:
While Luau doesn't currently implement JIT/AOT, this is likely to happen at some point; beyond the usual implementation challenges and security concerns, one significant limitation is that we don't have access to JIT on many platforms so for us maintaining excellent interpreted performance for gameplay and application code is more important than reaching peak FLOPS on numerical code.
I would highly recommend this be implemented as Luau implements a lot of useful stuff such as typechecking, assignment operators and buffers while also being fully compatible with Lua 5.1 and being more optimized
It also has a JIT compiler now
I'd be happy if someone tried it. Getting the Luau repo checked out as a git submodule into the third-party/ directory and integrating it into the build (see setup.py) shouldn't be too difficult. That'll show whether it then works out of the box or requires some code adaptations.
So, about this... I'm considering making my own bindings for Luau in python using Rust/PyO3 since my prior work on making Go bindings with Rust (gluau) also worked really nicely.
I agree with @Hedwig7s that it probably wouldnt work OOTB with Lupa, the C API is very different
So some good news here, I decided to take a stab at it and managed to get the thing to at least compile and load the VM/gccollect and destroy itself right. Panic handler also fires correctly. Userdata dtors are not implemented yet so theres a memory leak for all userdata uses rn but thats expected this early on.
Theres still a ton of errors and segfaults/aborts due to some memory related things (as well as some APIs which throw on Luau but not on normal Lua when memory limits are present) but i'll make a draft PR for it @scoder
Activity
scoder commentedon Feb 23, 2022
If this can be done (mostly) via C macros, and doesn't add too much to the maintenance burden, and assuming that luau is not just someone's hobby language but something that is actually being used (I had never heard of it myself), I wouldn't object to looking at a PR. Once there is a working implementation, this can be added to the list in #196
jmkd3v commentedon Feb 23, 2022
I've never worked with Lua or Luau's C APIs, but from the changes listed in luau-lang/luau#251 I don't think it can be done mostly with C macros.
awildergoose commentedon Apr 9, 2023
Up, Luau is a great variation of Lua, It was made by Roblox and is the current language for scripting, The best features are probably the typing and that it runs JIT (just line LuaJIT) and it's very fast and continuously being maintained
jmkd3v commentedon Apr 9, 2023
Luau doesn't run JIT:
https://luau-lang.org/why
awildergoose commentedon Mar 15, 2024
Sorry for the bump but, any news on this? Really looking forward to it.
Hedwig7s commentedon Apr 10, 2024
I would highly recommend this be implemented as Luau implements a lot of useful stuff such as typechecking, assignment operators and buffers while also being fully compatible with Lua 5.1 and being more optimized
It also has a JIT compiler now
cheesycod commentedon May 18, 2025
Same here, would like to see it implemented
scoder commentedon May 19, 2025
I'd be happy if someone tried it. Getting the Luau repo checked out as a git submodule into the
third-party/directory and integrating it into the build (seesetup.py) shouldn't be too difficult. That'll show whether it then works out of the box or requires some code adaptations.The VM implementation appears to be here: https://github.com/luau-lang/luau/tree/master/VM
Hedwig7s commentedon May 19, 2025
I'll be honest I don't think there's a chance it would work out of the box the C API had a wrecking ball taken to it
cheesycod commentedon Aug 21, 2025
So, about this... I'm considering making my own bindings for Luau in python using Rust/PyO3 since my prior work on making Go bindings with Rust (gluau) also worked really nicely.
I agree with @Hedwig7s that it probably wouldnt work OOTB with Lupa, the C API is very different
cheesycod commentedon Aug 26, 2025
So some good news here, I decided to take a stab at it and managed to get the thing to at least compile and load the VM/gccollect and destroy itself right. Panic handler also fires correctly. Userdata dtors are not implemented yet so theres a memory leak for all userdata uses rn but thats expected this early on.
Theres still a ton of errors and segfaults/aborts due to some memory related things (as well as some APIs which throw on Luau but not on normal Lua when memory limits are present) but i'll make a draft PR for it @scoder