Example project that:
- Uses Ziglua bindings
- Runs a Luau script either directly from source or by loading and executing bytecode
- Shows how to declare types for a Luau/Zig API
- Use luau-lsp in VSCode for type-checking Luau code
Running the luau script directly from source:
zig build run -- script/main.luau
Compile the luau script into bytecode, execute bytecode:
luau-compile --binary script/main.luau > script/main.luau.bin
zig build run -- script/main.luau.bin
- Install the Luau Language Server VSCode extension
- Load the example project by
code <repo_root_dir>
. This should pick up the right Luau lsp configuration from the ``.vscode/settings.json` file.
- luau-analyze with type types.d.luau (seems like luau-analyze cannot load type decls? see luau-lang/luau#1139)