From 83b4af6d6002e8b75ba02bdfa8d02b19e506be6d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 9 May 2026 08:00:42 +0800 Subject: [PATCH 1/2] feat: add mcpp build support (mcpp.toml) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the mcpp-build manifest alongside the existing xmake.lua so tinyhttps can be consumed/built by both ecosystems. The mcpp side relies on: * mbedtls 3.6.1 — pulled from mcpp-index (the descriptor lands in a parallel mcpp-community/mcpp-index PR). mcpp 0.0.2's C-language compile rule (`c_object`) builds mbedtls from source and packs it into libtinyhttps.a alongside the modular C++23 .m.o files. * gtest 1.15.2 — dev-only, picked up by `mcpp test` to run the existing tests/test_*.cpp. Verified: $ mcpp build ... Compiling mcpplibs.tinyhttps v0.2.0 (.) Cached mbedtls v3.6.1 Finished release [optimized] in 1.52s $ ar t target/.../bin/libtinyhttps.a | grep -c '\\.o$' # all 6 partitions + 108 mbedtls .c --- mcpp.toml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mcpp.toml diff --git a/mcpp.toml b/mcpp.toml new file mode 100644 index 0000000..d8c8ba7 --- /dev/null +++ b/mcpp.toml @@ -0,0 +1,27 @@ +[package] +name = "mcpplibs.tinyhttps" +version = "0.2.0" +description = "Minimal C++23 HTTP/HTTPS client with SSE streaming support" +license = "Apache-2.0" +repo = "https://github.com/mcpplibs/tinyhttps" + +[language] +standard = "c++23" +modules = true +import_std = true + +[modules] +sources = ["src/**/*.cppm"] +exports = ["mcpplibs.tinyhttps"] + +[targets.tinyhttps] +kind = "lib" + +# mbedtls is the only runtime dep. xmake.lua used `add_packages("mbedtls", { public = true })`; +# the mcpp build picks up mbedtls's headers + libmbedtls.a transparently. +[dependencies] +mbedtls = "3.6.1" + +# `mcpp test` resolves these and discovers tests/**/*.cpp automatically. +[dev-dependencies] +gtest = "1.15.2" From edba7dc6813c03b961cb13c2206871f169a2ae54 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 9 May 2026 08:01:35 +0800 Subject: [PATCH 2/2] feat(mcpp): add mcpp.lock + ignore target/ --- .gitignore | 2 ++ mcpp.lock | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 mcpp.lock diff --git a/.gitignore b/.gitignore index de9651b..1a3902c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ build/ .xmake/ +# mcpp build artefacts +target/ diff --git a/mcpp.lock b/mcpp.lock new file mode 100644 index 0000000..cd8f6ed --- /dev/null +++ b/mcpp.lock @@ -0,0 +1,8 @@ +# Auto-generated by mcpp. Do not edit by hand. +version = 1 + +[package."mbedtls"] +version = "3.6.1" +source = "mcpp-index+https://github.com/mcpp-community/mcpp-index.git" +hash = "sha256:" +