Skip to content

Commit 49bfb7a

Browse files
committed
Add muduo and required Boost packages
1 parent c0c5e01 commit 49bfb7a

17 files changed

Lines changed: 317 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# muduo compat and Boost dependencies
2+
3+
- muduo upstream: `chenshuo/muduo`, release `v2.0.3`, BSD-3-Clause.
4+
- muduo is packaged as Form B from the GitHub release archive; direct source compilation includes muduo base/network/poller units and excludes optional examples, protobuf/RPC, and contrib targets. The upstream empty `boilerplate.cc` is excluded because its referenced `BoilerPlate.h` is absent from the archive.
5+
- muduo archive SHA-256: `5e90c2f07074ed5ab9347959edc8d387e40a57fbffb92e4a99cfb9a230851371` (two matching calculations).
6+
- Dependency research from the actual compiler errors and upstream include tree found `boost/operators.hpp`, `boost/any.hpp`, and `boost/circular_buffer.hpp`. `boost/operators.hpp` is provided by Boost.Utility; that descriptor already existed. Added `compat.boost-any` and `compat.boost-circular-buffer`; the latter's transitive include closure also required adding `compat.boost-concept-check`.
7+
- Added Boost component versions all follow the index's 1.92.0 train:
8+
- `compat.boost-any`, upstream `boostorg/any`, BSL-1.0; SHA-256 `335090455387b06b356bbc317d4949f6e7455165942bd7f50dbfe9cab96d624a`.
9+
- `compat.boost-circular-buffer`, upstream `boostorg/circular_buffer`, BSL-1.0; SHA-256 `0845c8f06fe5a40ef5955360f37054bd8bb856d2ecd4ae5daa8c04252358e34e`.
10+
- `compat.boost-concept-check`, upstream `boostorg/concept_check`, BSL-1.0; SHA-256 `8dbd2385b0045eddb4c0f071f3c9740c1e61fa3c4cb50d29e139b4b05f55b7e8`.
11+
- SHA-256 values above were computed twice per archive. CN mirrors are not configured; descriptors use plain upstream URL strings until matching GitCode assets are available.
12+
- muduo depends on `compat.boost-any`, `compat.boost-circular-buffer`, and existing `compat.boost-utility`.
13+
- Workspace tests: `boost-any` checks value storage/cast/clear; `boost-circular-buffer` checks bounded overwrite; `boost-concept-check` compiles concept assertions; `muduo` checks Buffer behavior.
14+
- Verification: `mcpp test -p boost-any`, `mcpp test -p boost-circular-buffer`, `mcpp test -p boost-concept-check`, and `mcpp test -p muduo` passed on the local Linux toolchain. The environment emitted its existing default-SubOS-description warning; it did not fail these runs.
15+
- Platform caveat: all source descriptors declare the three xpm platforms, but muduo behavior is intended for Linux/macOS; macOS/Windows CI still needs to establish actual support.

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
### Added
1111

12+
- **`compat.muduo` 2.0.3 与 Boost 头组件。** muduo 的依赖闭包由 `compat.boost-any`、
13+
`compat.boost-circular-buffer`、`compat.boost-concept-check` 和既有 `compat.boost-utility`
14+
满足;新增三个 Boost compat 描述符及各自 workspace 行为/编译测试。归档 URL 使用 GLOBAL 上游源,
15+
CN 镜像待补。Linux 上 `mcpp test -p muduo` 与三个 Boost 成员均通过。
16+
1217
- **`compat.yaml-cpp` 0.8.0 与 0.9.0。** YAML 1.2 解析与生成,按上游 CMake 目标原样编译
1318
(`src/*.cpp` + `src/contrib/*.cpp`),GLOBAL + GitCode CN 镜像字节一致。上游把
1419
`YAML_CPP_STATIC_DEFINE` 作为静态构建的 PUBLIC 定义;描述符的 `defines` 到不了消费者,

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ One descriptor per common shape:
3838
| Native module library (Form A) | [`mcpplibs.tinyhttps`](pkgs/t/tinyhttps.lua) · [`gzj-creator.galay`](pkgs/g/gzj-creator.galay.lua) |
3939
| C sources + `features` | [`compat.cjson`](pkgs/c/compat.cjson.lua) |
4040
| C++ sources, several versions | [`compat.yaml-cpp`](pkgs/c/compat.yaml-cpp.lua) |
41+
| Boost header-only components | [`compat.boost-any`](pkgs/c/compat.boost-any.lua) · [`compat.boost-circular-buffer`](pkgs/c/compat.boost-circular-buffer.lua) · [`compat.boost-concept-check`](pkgs/c/compat.boost-concept-check.lua) · [`compat.boost-utility`](pkgs/c/compat.boost-utility.lua) |
4142
| Header-only | [`compat.gtl`](pkgs/c/compat.gtl.lua) |
43+
| C++ network library | [`compat.muduo`](pkgs/c/compat.muduo.lua) |
4244
| Generated config header | [`compat.c-ares`](pkgs/c/compat.c-ares.lua) |
4345
| C++23 module wrapper | [`nlohmann.json`](pkgs/n/nlohmann.json.lua) |
4446
| C++23 module shipped by upstream | [`khronos.vulkan-hpp`](pkgs/k/khronos.vulkan-hpp.lua) |

‎README.zh-CN.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ mcpp self config --mirror CN # 切换至国内镜像,默认使用 GLOBAL 上
3737
| 原生模块库(Form A) | [`mcpplibs.tinyhttps`](pkgs/t/tinyhttps.lua) · [`gzj-creator.galay`](pkgs/g/gzj-creator.galay.lua) |
3838
| C 源码 + `features` | [`compat.cjson`](pkgs/c/compat.cjson.lua) |
3939
| C++ 源码,多版本 | [`compat.yaml-cpp`](pkgs/c/compat.yaml-cpp.lua) |
40+
| Boost 头文件组件 | [`compat.boost-any`](pkgs/c/compat.boost-any.lua) · [`compat.boost-circular-buffer`](pkgs/c/compat.boost-circular-buffer.lua) · [`compat.boost-concept-check`](pkgs/c/compat.boost-concept-check.lua) · [`compat.boost-utility`](pkgs/c/compat.boost-utility.lua) |
41+
| C++ 网络库 | [`compat.muduo`](pkgs/c/compat.muduo.lua) |
4042
| header-only | [`compat.gtl`](pkgs/c/compat.gtl.lua) |
4143
| 生成 config 头 | [`compat.c-ares`](pkgs/c/compat.c-ares.lua) |
4244
| C++23 module wrapper | [`nlohmann.json`](pkgs/n/nlohmann.json.lua) |

‎mcpp.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ members = [
1313
"tests/examples/asio-module",
1414
"tests/examples/asio-ssl",
1515
"tests/examples/boost-asio",
16+
"tests/examples/boost-any",
17+
"tests/examples/boost-circular-buffer",
18+
"tests/examples/boost-concept-check",
1619
"tests/examples/boost-assert",
1720
"tests/examples/boost-beast",
1821
"tests/examples/boost-config",
@@ -73,6 +76,7 @@ members = [
7376
"tests/examples/marzer.tomlplusplus",
7477
"tests/examples/mcpp-plugins",
7578
"tests/examples/mio",
79+
"tests/examples/muduo",
7680
"tests/examples/libmysqlclient",
7781
"tests/examples/mysql-connector-cpp",
7882
"tests/examples/nlohmann.json",

‎pkgs/c/compat.boost-any.lua‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package = {
2+
spec = "1",
3+
namespace = "compat",
4+
name = "boost-any",
5+
description = "Boost.Any 1.92.0 — a type-safe container for single values of different types",
6+
licenses = {"BSL-1.0"},
7+
repo = "https://github.com/boostorg/any",
8+
type = "package",
9+
10+
xpm = {
11+
linux = {
12+
["1.92.0"] = {
13+
url = "https://github.com/boostorg/any/archive/refs/tags/boost-1.92.0.tar.gz",
14+
sha256 = "335090455387b06b356bbc317d4949f6e7455165942bd7f50dbfe9cab96d624a",
15+
},
16+
},
17+
macosx = {
18+
["1.92.0"] = {
19+
url = "https://github.com/boostorg/any/archive/refs/tags/boost-1.92.0.tar.gz",
20+
sha256 = "335090455387b06b356bbc317d4949f6e7455165942bd7f50dbfe9cab96d624a",
21+
},
22+
},
23+
windows = {
24+
["1.92.0"] = {
25+
url = "https://github.com/boostorg/any/archive/refs/tags/boost-1.92.0.tar.gz",
26+
sha256 = "335090455387b06b356bbc317d4949f6e7455165942bd7f50dbfe9cab96d624a",
27+
},
28+
},
29+
},
30+
31+
mcpp = {
32+
language = "c++23",
33+
import_std = false,
34+
include_dirs = { "*/include" },
35+
generated_files = {
36+
["mcpp_generated/boost_any_anchor.cpp"] = "int mcpp_compat_boost_any_anchor(void) { return 0; }\n",
37+
},
38+
sources = { "mcpp_generated/boost_any_anchor.cpp" },
39+
targets = { ["boost_any"] = { kind = "lib" } },
40+
deps = {
41+
["compat.boost-config"] = "1.92.0",
42+
["compat.boost-throw-exception"] = "1.92.0",
43+
["compat.boost-type-index"] = "1.92.0",
44+
},
45+
},
46+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package = {
2+
spec = "1",
3+
namespace = "compat",
4+
name = "boost-circular-buffer",
5+
description = "Boost.CircularBuffer 1.92.0 — a STL-compatible ring buffer container",
6+
licenses = {"BSL-1.0"},
7+
repo = "https://github.com/boostorg/circular_buffer",
8+
type = "package",
9+
10+
xpm = {
11+
linux = {
12+
["1.92.0"] = {
13+
url = "https://github.com/boostorg/circular_buffer/archive/refs/tags/boost-1.92.0.tar.gz",
14+
sha256 = "0845c8f06fe5a40ef5955360f37054bd8bb856d2ecd4ae5daa8c04252358e34e",
15+
},
16+
},
17+
macosx = {
18+
["1.92.0"] = {
19+
url = "https://github.com/boostorg/circular_buffer/archive/refs/tags/boost-1.92.0.tar.gz",
20+
sha256 = "0845c8f06fe5a40ef5955360f37054bd8bb856d2ecd4ae5daa8c04252358e34e",
21+
},
22+
},
23+
windows = {
24+
["1.92.0"] = {
25+
url = "https://github.com/boostorg/circular_buffer/archive/refs/tags/boost-1.92.0.tar.gz",
26+
sha256 = "0845c8f06fe5a40ef5955360f37054bd8bb856d2ecd4ae5daa8c04252358e34e",
27+
},
28+
},
29+
},
30+
31+
mcpp = {
32+
language = "c++23",
33+
import_std = false,
34+
include_dirs = { "*/include" },
35+
generated_files = {
36+
["mcpp_generated/boost_circular_buffer_anchor.cpp"] = "int mcpp_compat_boost_circular_buffer_anchor(void) { return 0; }\n",
37+
},
38+
sources = { "mcpp_generated/boost_circular_buffer_anchor.cpp" },
39+
targets = { ["boost_circular_buffer"] = { kind = "lib" } },
40+
deps = {
41+
["compat.boost-concept-check"] = "1.92.0",
42+
["compat.boost-config"] = "1.92.0",
43+
["compat.boost-core"] = "1.92.0",
44+
["compat.boost-move"] = "1.92.0",
45+
["compat.boost-throw-exception"] = "1.92.0",
46+
["compat.boost-type-traits"] = "1.92.0",
47+
},
48+
},
49+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package = {
2+
spec = "1",
3+
namespace = "compat",
4+
name = "boost-concept-check",
5+
description = "Boost.ConceptCheck 1.92.0 — compile-time checks for C++ concepts and requirements",
6+
licenses = {"BSL-1.0"},
7+
repo = "https://github.com/boostorg/concept_check",
8+
type = "package",
9+
10+
xpm = {
11+
linux = {
12+
["1.92.0"] = {
13+
url = "https://github.com/boostorg/concept_check/archive/refs/tags/boost-1.92.0.tar.gz",
14+
sha256 = "8dbd2385b0045eddb4c0f071f3c9740c1e61fa3c4cb50d29e139b4b05f55b7e8",
15+
},
16+
},
17+
macosx = {
18+
["1.92.0"] = {
19+
url = "https://github.com/boostorg/concept_check/archive/refs/tags/boost-1.92.0.tar.gz",
20+
sha256 = "8dbd2385b0045eddb4c0f071f3c9740c1e61fa3c4cb50d29e139b4b05f55b7e8",
21+
},
22+
},
23+
windows = {
24+
["1.92.0"] = {
25+
url = "https://github.com/boostorg/concept_check/archive/refs/tags/boost-1.92.0.tar.gz",
26+
sha256 = "8dbd2385b0045eddb4c0f071f3c9740c1e61fa3c4cb50d29e139b4b05f55b7e8",
27+
},
28+
},
29+
},
30+
31+
mcpp = {
32+
language = "c++23",
33+
import_std = false,
34+
include_dirs = { "*/include" },
35+
generated_files = {
36+
["mcpp_generated/boost_concept_check_anchor.cpp"] = "int mcpp_compat_boost_concept_check_anchor(void) { return 0; }\n",
37+
},
38+
sources = { "mcpp_generated/boost_concept_check_anchor.cpp" },
39+
targets = { ["boost_concept_check"] = { kind = "lib" } },
40+
deps = {
41+
["compat.boost-assert"] = "1.92.0",
42+
["compat.boost-config"] = "1.92.0",
43+
["compat.boost-type-traits"] = "1.92.0",
44+
["compat.boost-preprocessor"] = "1.92.0",
45+
},
46+
},
47+
}

‎pkgs/c/compat.muduo.lua‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package = {
2+
spec = "1",
3+
namespace = "compat",
4+
name = "muduo",
5+
description = "A C++ network library for Linux and macOS",
6+
licenses = {"BSD-3-Clause"},
7+
repo = "https://github.com/chenshuo/muduo",
8+
type = "package",
9+
10+
xpm = {
11+
linux = {
12+
["2.0.3"] = {
13+
url = "https://github.com/chenshuo/muduo/archive/refs/tags/v2.0.3.tar.gz",
14+
sha256 = "5e90c2f07074ed5ab9347959edc8d387e40a57fbffb92e4a99cfb9a230851371",
15+
},
16+
},
17+
macosx = {
18+
["2.0.3"] = {
19+
url = "https://github.com/chenshuo/muduo/archive/refs/tags/v2.0.3.tar.gz",
20+
sha256 = "5e90c2f07074ed5ab9347959edc8d387e40a57fbffb92e4a99cfb9a230851371",
21+
},
22+
},
23+
windows = {
24+
["2.0.3"] = {
25+
url = "https://github.com/chenshuo/muduo/archive/refs/tags/v2.0.3.tar.gz",
26+
sha256 = "5e90c2f07074ed5ab9347959edc8d387e40a57fbffb92e4a99cfb9a230851371",
27+
},
28+
},
29+
},
30+
31+
mcpp = {
32+
language = "c++23",
33+
import_std = false,
34+
include_dirs = { "*" },
35+
sources = {
36+
"*/muduo/base/*.cc",
37+
"*/muduo/net/poller/DefaultPoller.cc",
38+
"*/muduo/net/poller/EPollPoller.cc",
39+
"*/muduo/net/poller/PollPoller.cc",
40+
"*/muduo/net/Acceptor.cc",
41+
"*/muduo/net/Buffer.cc",
42+
"*/muduo/net/Channel.cc",
43+
"*/muduo/net/Connector.cc",
44+
"*/muduo/net/EventLoop.cc",
45+
"*/muduo/net/EventLoopThread.cc",
46+
"*/muduo/net/EventLoopThreadPool.cc",
47+
"*/muduo/net/InetAddress.cc",
48+
"*/muduo/net/Poller.cc",
49+
"*/muduo/net/Socket.cc",
50+
"*/muduo/net/SocketsOps.cc",
51+
"*/muduo/net/TcpClient.cc",
52+
"*/muduo/net/TcpConnection.cc",
53+
"*/muduo/net/TcpServer.cc",
54+
"*/muduo/net/Timer.cc",
55+
"*/muduo/net/TimerQueue.cc",
56+
},
57+
targets = {
58+
["muduo"] = { kind = "lib" },
59+
},
60+
deps = {
61+
["compat.boost-circular-buffer"] = "1.92.0",
62+
["compat.boost-any"] = "1.92.0",
63+
["compat.boost-utility"] = "1.92.0",
64+
},
65+
},
66+
}

‎tests/examples/boost-any/mcpp.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# compat.boost-any test project.
2+
[package]
3+
name = "boost-any-tests"
4+
version = "0.1.0"
5+
6+
[dependencies.compat]
7+
boost-any = "1.92.0"

0 commit comments

Comments
 (0)