Skip to content

Commit d56abcb

Browse files
authored
feat: add mcpp.toml for mcpp build support (#2)
Wires mcpplibs.capi.lua into the mcpp build system. The descriptor: - targets `capi-lua` (lib) at `src/capi/lua.cppm` (override the default lib-root convention which would look at `src/lua.cppm`), - depends on the upstream Lua 5.4.7 C library shipped via mcpp-community/mcpp-index (added 2026-05-09). mcpp 0.0.3's transitive walker propagates lua's headers into our compile rule, so the existing `extern "C" { #include <lua.h> ... }` in `src/capi/lua_headers.h` keeps working with no path tweaking. Verified locally: `mcpp build` is clean against a fresh `target/`.
1 parent 9a8042a commit d56abcb

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

mcpp.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "mcpplibs.capi.lua"
3+
version = "0.0.3"
4+
description = "C++23 module wrapping the Lua 5.4 C API — `import mcpplibs.capi.lua;`"
5+
license = "Apache-2.0"
6+
repo = "https://github.com/mcpplibs/lua"
7+
8+
[lib]
9+
# The primary module interface lives at `src/capi/lua.cppm`. The default
10+
# convention would look at `src/lua.cppm` (last segment of the package
11+
# name), so override explicitly.
12+
path = "src/capi/lua.cppm"
13+
14+
[targets.capi-lua]
15+
kind = "lib"
16+
17+
# `lua` is the upstream Lua 5.4 C library shipped via mcpp-index. mcpp
18+
# 0.0.3 propagates its headers (lua.h / lauxlib.h / lualib.h) into our
19+
# compile rule via the transitive include-dir walk.
20+
[dependencies]
21+
lua = "5.4.7"
22+
23+
# `mcpp test` discovers tests/main.cpp automatically.
24+
[dev-dependencies]
25+
gtest = "1.15.2"

0 commit comments

Comments
 (0)