Vendor Box3D and build it into .tools/ #68

Closed
opened 2026-09-05 09:35:07 +00:00 by crowmaki · 0 comments
Owner

Parent

Part of #67.

What to build

Box3D is in the tree and builds. The pinned upstream C sources are vendored beside a box3d bindings package whose bindings are copied from Odin's vendor collection and re-pointed at .tools/, spelling the pinned version the way the cimgui bindings do. A just fetch-box3d recipe compiles the sources as C17 with clang, archives them with llvm-lib into .tools/box3d/<version>/lib/, and verifies a known Box3D symbol is defined. BOX3D_DISABLE_SIMD and BOX3D_DOUBLE_PRECISION are never set. The justfile's packages list and the AGENTS.md recipe table gain the new entries.

A test proves the library links and runs: create a world with default gravity, add a dynamic body with a box hull, step once, observe it moved down, destroy everything.

Acceptance criteria

  • Box3D C sources are committed at one recorded upstream commit, with its licence.
  • just fetch-box3d produces the static library into .tools/ and refuses output lacking a known Box3D symbol; a second run reports it already present.
  • The box3d package type-checks under just check and imports the library from .tools/.
  • A test in the core suite creates, steps and destroys a Box3D world through the bindings and sees a dynamic body fall.
  • No SIMD or double-precision toggle appears in the build recipe or the bindings.
  • AGENTS.md lists the new recipe.

Blocked by

  • None (can start immediately).
## Parent Part of #67. ## What to build Box3D is in the tree and builds. The pinned upstream C sources are vendored beside a `box3d` bindings package whose bindings are copied from Odin's vendor collection and re-pointed at `.tools/`, spelling the pinned version the way the cimgui bindings do. A `just fetch-box3d` recipe compiles the sources as C17 with clang, archives them with llvm-lib into `.tools/box3d/<version>/lib/`, and verifies a known Box3D symbol is defined. `BOX3D_DISABLE_SIMD` and `BOX3D_DOUBLE_PRECISION` are never set. The justfile's `packages` list and the AGENTS.md recipe table gain the new entries. A test proves the library links and runs: create a world with default gravity, add a dynamic body with a box hull, step once, observe it moved down, destroy everything. ## Acceptance criteria - [ ] Box3D C sources are committed at one recorded upstream commit, with its licence. - [ ] `just fetch-box3d` produces the static library into `.tools/` and refuses output lacking a known Box3D symbol; a second run reports it already present. - [ ] The `box3d` package type-checks under `just check` and imports the library from `.tools/`. - [ ] A test in the core suite creates, steps and destroys a Box3D world through the bindings and sees a dynamic body fall. - [ ] No SIMD or double-precision toggle appears in the build recipe or the bindings. - [ ] AGENTS.md lists the new recipe. ## Blocked by - None (can start immediately).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crowmaki/cinnabar#68
No description provided.