A GDExtension that adds Luau C/C++ API bindings to GDScript (+ some extras)
Warning
This repository's
main
branch is only usable with GDExtension from Godot'smaster
branch.
GDLuau is for in-game scripting / UGC / modding. (This is not a replacement for or an alternative to GDScript.)
Luau API closely follows Lua 5.1 API, you can find the manual here.
For coding in lua/luau take a look at the "Getting Started" section on luau-lang.org.
- Full C/C++ API in GDScript excluding lightuserdata/userdata
- Pushing/Pulling normal Callables (lambda Callables aren't supported)
- Pushing/Pulling Objects (Node / RefCounted) (as userdata)
- Pushing/Pulling Godot Arrays and Dictionaries
- Pushing/Pulling Godot Vector4s as Luau vectors
- Custom print implementation that emits a signal
- lua_loadstring, lua_dostring in GDScript (were "missing" in Luau)
- Configurable interrupt signal for run-away scripts (
while true do end
)
- Clone the repo with
--recursive
to also clone submodules - Run
scons platform=<platform>
(also, preferably, adduse_mingw=yes
, if you have it installed) - A test project is included in the repo