Merged
Conversation
- Add src/capi/lua.cppm (module interface) and src/capi/lua.cpp (implementation) - Wrap lua.h, lauxlib.h, lualib.h in mcpplibs::capi::lua namespace - Types: State, Number, Integer, CFunction, L_Reg, L_Buffer, etc. - Constants: status codes, type tags, operators, GC options, hook masks - Functions: 100+ bindings covering state, stack, push/access, tables, globals, calls, coroutines, GC, debug, auxiliary library, standard libs - Use extern C wrapper header to fix GCC C++ modules linkage issue - 97 comprehensive Google Test cases covering all API categories - 4 examples: basic, table, function, eval - Update xmake.lua, CMakeLists.txt, CI workflow, README, architecture docs - Design docs and task breakdown in docs/pr/ - Remove old templates.cppm placeholder module Co-authored-by: SPeak <sunrisepeak@d2learn.org>
- SKILL.md: quick start, naming map, core API cheat sheet, common patterns, build config, caveats (callback signatures, extern C, inline limitation) - reference.md: complete API reference with all 15 types, 50+ constants, 100+ functions organized by category with C API correspondence - Update skills README to list both available skills Co-authored-by: SPeak <sunrisepeak@d2learn.org>
|
Cursor Agent can help with this pull request. Just |
GCC C++ modules require std.gcm to exist before dependent targets compile. Build mcpplibs-capi-lua first (serialized) then build remaining targets in parallel. Co-authored-by: SPeak <sunrisepeak@d2learn.org>
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.
Adds
mcpplibs.capi.luamodule, providing a simple C++23 modular binding for the Lua C API.This PR introduces the
mcpplibs.capi.luamodule, which wraps the Lua 5.4 C API into a C++23 module (mcpplibs::capi::lua). It includes comprehensive tests, examples, and documentation. Key challenges addressed during implementation involved resolving GCC C++ moduleextern "C"linkage issues using a wrapper header and splitting the module into interface (.cppm) and implementation (.cpp) files to handle C++ name mangling with inline functions.