feat: add mcpp.toml for mcpp build support#16
Merged
Conversation
Wires libxpkg into the mcpp build system. Bumps version to 0.0.39 (continuing the existing 0.0.x series) and ships: - `mcpp.toml` — single `lib` target named `xpkg`, primary module at `src/xpkg.cppm` (matches the lib-root convention; tail segment of the package name `mcpplibs.xpkg` is `xpkg`). - `src/xpkg-lua-stdlib.cppm` — committed for mcpp builds. xmake regenerates this from `src/lua-stdlib/**/*.lua` via `before_build`, but mcpp doesn't have an equivalent codegen hook yet, so we ship the generated copy in the repo. Re-run the xmake target whenever the .lua sources change to keep both in sync. - depends on `mcpplibs.capi.lua = "0.0.3"` — the C++23 module wrapper for the Lua C API, indexed in mcpp-community/mcpp-index. Verified locally: `mcpp build` produces `target/.../bin/libxpkg.a` containing all five modules (xpkg, loader, index, executor, lua_stdlib) with the dependency on capi-lua + lua resolved transitively.
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
Wires libxpkg into the mcpp build system on top of the existing xmake support.
mcpp.toml— singlelibtarget namedxpkg, primary module atsrc/xpkg.cppm(matches the lib-root convention since the package's tail segment isxpkg).mcpplibs.capi.lua = "0.0.3", indexed in mcpp-index.mcpp 0.0.3's transitive walker pulls
lua(Lua 5.4 C library) along the chain capi-lua → lua, so theimport mcpplibs.capi.lua;calls insidexpkg-loader.cppm/xpkg-executor.cppmresolve transparently.lua-stdlib codegen note
xmake regenerates
src/xpkg-lua-stdlib.cppmfromsrc/lua-stdlib/**/*.luaviabefore_build. mcpp doesn't have an equivalent pre-build hook yet, so the already-tracked generated copy insrc/xpkg-lua-stdlib.cppmis what mcpp builds against. Re-runxmake build mcpplibs-xpkg-lua-stdlibafter editing the .lua sources to keep both up to date.Test plan
mcpp buildproducestarget/.../bin/libxpkg.acontaining all five modules with deps resolved transitivelyv0.0.39so the tarball flows into mcpp-index