Vendor Box3D and build it into .tools/ (#68) #100

Merged
crowmaki merged 2 commits from box3d-vendor into main 2026-09-06 23:24:57 +00:00
Owner

Closes #68. Part of #67.

What

  • plugins/box3d/vendor/ vendors the upstream Box3D C sources with the MIT licence, pinned at commit 3fc20f5b453ba9e14cdf54ecafa87a2a4bcdf53c (2026-07-30). That is the exact commit Odin's vendor:box3d snapshot was taken from, verified by blob-hash match and a full diff.
  • plugins/box3d/box3d/ is the bindings package, copied from Odin's vendor:box3d. The header records BOX3D_VERSION and BOX3D_COMMIT and imports .tools/box3d/0.1.0/lib/box3d.lib. The DOUBLE_PRECISION switch is collapsed so the ABI is fixed at f32; the foreign import stays exported because the other five binding files bind against it.
  • just fetch-box3d compiles the vendored sources as C17 with clang, archives them with llvm-lib into .tools/box3d/0.1.0/lib/, and refuses output lacking b3CreateWorld. A second run reports the library already present. Neither BOX3D_DISABLE_SIMD nor BOX3D_DOUBLE_PRECISION is defined anywhere.
  • tests/core/box3d_test.odin creates a world with default gravity, drops a dynamic box hull, steps once, sees it fall, and destroys the body.
  • The justfile packages list, the justfile header, the AGENTS.md recipe table and Box3D link, and ADR-0016's build description are updated.

Verification

just fetch-box3d (twice), just check, and just test all pass; the core suite runs 336 tests.

Closes #68. Part of #67. ## What - `plugins/box3d/vendor/` vendors the upstream Box3D C sources with the MIT licence, pinned at commit `3fc20f5b453ba9e14cdf54ecafa87a2a4bcdf53c` (2026-07-30). That is the exact commit Odin's `vendor:box3d` snapshot was taken from, verified by blob-hash match and a full diff. - `plugins/box3d/box3d/` is the bindings package, copied from Odin's `vendor:box3d`. The header records `BOX3D_VERSION` and `BOX3D_COMMIT` and imports `.tools/box3d/0.1.0/lib/box3d.lib`. The `DOUBLE_PRECISION` switch is collapsed so the ABI is fixed at f32; the foreign import stays exported because the other five binding files bind against it. - `just fetch-box3d` compiles the vendored sources as C17 with clang, archives them with llvm-lib into `.tools/box3d/0.1.0/lib/`, and refuses output lacking `b3CreateWorld`. A second run reports the library already present. Neither `BOX3D_DISABLE_SIMD` nor `BOX3D_DOUBLE_PRECISION` is defined anywhere. - `tests/core/box3d_test.odin` creates a world with default gravity, drops a dynamic box hull, steps once, sees it fall, and destroys the body. - The justfile `packages` list, the justfile header, the AGENTS.md recipe table and Box3D link, and ADR-0016's build description are updated. ## Verification `just fetch-box3d` (twice), `just check`, and `just test` all pass; the core suite runs 336 tests.
Box3D's C sources are committed under plugins/box3d/vendor at upstream commit
3fc20f5b, the commit Odin's vendor:box3d bindings were generated against, with
its MIT licence. The bindings are copied into the box3d package and import
.tools/box3d/0.1.0/lib/box3d.lib; the double-precision switch is collapsed so
the ABI is fixed at f32. just fetch-box3d compiles the sources as C17 with
clang, archives them with llvm-lib, and refuses output lacking b3CreateWorld.
A core test creates a world, drops a dynamic box hull, steps once, and sees it
fall.
crowmaki deleted branch box3d-vendor 2026-09-06 23:24:57 +00:00
Sign in to join this conversation.
No reviewers
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!100
No description provided.