fetch-luau recipe and the committed Luau foreign binding package (#78) #90
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar!90
Loading…
Reference in a new issue
No description provided.
Delete branch "luau-runtime-78"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #78
What
just fetch-luaudownloads the pinned Luau source tarball, hash-verifies the decompressed tar againstluau_hashesin the justfile, configures it with CMake and Ninja on clang++ withLUAU_EXTERN_C=ON, buildsLuau.Common,Luau.Ast,Luau.Bytecode,Luau.CompilerandLuau.VM, checks thatlua_pcall,luau_loadandluau_compileexport with C linkage, and installs under.tools/luau/<version>/. A second run reports "already present";force=1rebuilds.plugins/luau/luais a hand-writtenforeign importpackage for the Luau C API subset the Plugin will use: state creation and close, compile, load,pcall, stack access, tables, userdata with metatables, light userdata, thread data and the VM callbacks. It pinsLUAU_VERSIONandLUAU_SOURCE_SHA256; the recipe refuses if the Odin hash disagrees with the justfile table. The package type-checks with.tools/luauabsent.tests/luaujoins the suite list with a smoke test (compile,pcall, read a global back) plus load rejection, a runtime error throughpcall, a C callback recovering host state from thread data, and a userdata method call through a metatable.fetch-luau.Toolchain notes baked into the recipe
LUAU_STATIC_CRT=ON. This also keeps the bytecodeluau_compilemallocs freeable withlibc.freefrom Odin.libcpmtlacked, so the recipe builds with_USE_STD_VECTOR_ALGORITHMS=0.Verification
just fetch-luautwice (build, then "already present"), and once withforce=1.just checkwith and without.tools/luaupresent.just test: all six suites pass, including the newluausuite.