Skip to content

box2d-m 3.2.0: Box2D 3.2.0 as C++23 modules (mcpplibs.mwrap.box2d) - #1

Merged
Sunrisepeak merged 6 commits into
mainfrom
box2d-m-3.2.0
Oct 28, 2026
Merged

Sunrisepeak merged 6 commits into
mainfrom
box2d-m-3.2.0

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

First release of mcpplibs.mwrap.box2d 3.2.0: Box2D v3.2.0 (MIT) as C++23 modules over compat.box2d 3.2.0 (mcpplibs/mcpp-index#611).

  • import mcpplibs.mwrap.box2d; — every declaration of the installed headers by export using under the upstream global names: 110 types, 3 opaque structs, 176 enumerators, 506 B2_API functions (b2InternalAssert under the header's own assertion conditional), 91 inline functions (inline in C++, so exportable as they are), 8 C++ vector operators, b2_lengthUnitsPerMeter. The 13 static const objects (internal linkage: b2_nullBodyId, b2Rot_identity …) are inline constexpr of the same type and initializer in mcpplibs::mwrap::box2d.
  • import mcpplibs.mwrap.box2d.macros; — 20 constants of their macro's type, the 5 length-unit values as functions (B2_LINEAR_SLOP(): they read b2_lengthUnitsPerMeter), B2_IS_NULL / B2_IS_NON_NULL / B2_ID_EQUALS as constexpr templates; 12 stay in <mwrap/box2d/macros.hpp> (declaration specifiers, initializer syntax, assertions), each with its reason. Generated from the pinned headers (tools/gen_exports.py), audited by tools/check_exports.py, every mapping checked against the raw header.
  • Determinism: tests/determinism_test.cpp pins upstream's falling-hinges scene (sleep step 299, hash 0x465F3DF4, upstream's own values) and a struck 20-row pyramid (600 steps, sleep off) under 1/2/4/8 workers, a user task system and the SSE2 fallback; tools/run_determinism.py reports them through examples/box2d (box2d-determinism) on every row: Linux x86_64 GCC/LLVM, Linux arm64 GCC/LLVM, macOS, Windows, and wasm32-emscripten under node.
  • Default template physics, bilingual README, docs/usage.md, release and template workflows; tools/candidate_index.py resolves compat.box2d from #611's branch until it is published.

… generated from the pinned headers; API, macro and header-mixing tests; export audit
…F4) and a struck 20-row pyramid (600 steps) pinned under 1-8 workers, a user task system and the SSE2 fallback; examples/box2d (box2d-determinism) and tools/run_determinism.py
…umentation, CI (Linux x86_64 GCC/LLVM, Linux arm64 GCC/LLVM, macOS, Windows, the Web), release and template workflows; the candidate compat index while compat.box2d is unpublished
…ppens only when optimizing); the tests in the release profile, natively and under node
@Sunrisepeak
Sunrisepeak merged commit 361aa31 into main Oct 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant