Skip to content

Manonox/GDLuau

Repository files navigation

GDLuau

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's master branch.

About

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.

Features

  • 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)

Compiling

  • Clone the repo with --recursive to also clone submodules
  • Run scons platform=<platform> (also, preferably, add use_mingw=yes, if you have it installed)
  • A test project is included in the repo

lua logo