feat: add lua 5.4.7 (C library)#4
Merged
Sunrisepeak merged 2 commits intomainfrom May 9, 2026
Merged
Conversation
Pure-C scripting library; relies on mcpp's C compile rule. Form B descriptor enumerates the 32 library translation units (CORE_O + LIB_O from upstream's src/Makefile) into a single `liblua.a` static archive. The two binary entry points (src/lua.c interpreter, src/luac.c bytecode compiler) are intentionally excluded — both define `int main()` and aren't part of the embeddable library. Tarball: https://www.lua.org/ftp/lua-5.4.7.tar.gz SHA256: 9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30 Verified end-to-end with a small consumer that calls lua_State / luaL_openlibs / luaL_dostring("return 1+2") — outputs "3", links clean against liblua.a, no main() collision.
The previous check insisted on `schema = "0.1"` and an inline
`mcpp = { ... }` segment. Both are wrong for the actual xpkg V1
schema we use:
- xpkg V1 names the version field `spec`, not `schema`. (None of the
existing descriptors in this repo carry `schema = "0.1"`, so this
check would have flagged every file the moment any pkgs/ change
triggered the workflow.)
- The inline `mcpp = {}` segment is Form B only; Form A descriptors
(mcpplibs.tinyhttps, mcpplibs.llmapi after their upstream started
shipping mcpp.toml) intentionally omit it.
Replace both with the actual xpkg V1 baseline:
- `package = { ... }` assignment present (via syntax-only `loadfile`
parse — catches typos without executing user code)
- required fields: `spec`, `name`, `xpm`
- still flag the forbidden `function install(...)` hook
Adds a `lua5.4` install step so the syntax check has an interpreter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
luapackage descriptor (Form B) covering Lua 5.4.7 — the upstream tarball at https://www.lua.org/ftp/lua-5.4.7.tar.gz.The 32 library translation units (CORE_O + LIB_O from upstream's
src/Makefile) build into a singleliblua.a. The two binary entry points (src/lua.cinterpreter,src/luac.cbytecode compiler) are intentionally excluded — both defineint main()and aren't part of the embeddable library; consumers#include <lua.h>+ link againstliblua.ainstead.Pure-C; relies on mcpp's C compile rule (since 0.0.2).
c_standard = "c99"matches upstream's reference build.Test plan
mcpp buildof a small consumer that callsluaL_newstate/luaL_openlibs/luaL_dostring("return 1+2")links cleanly and outputs3at runtime