makepad/libs/box3d/Cargo.toml
Admin f75dd2bba6 box3d: unchecked-hulls opt-in feature + algebraic-float-ops evaluation
unchecked-hulls (off by default): elides bounds checks on hull-topology
indexing in the three SAT hot loops via a cfg'd accessor. Safety contract
= hull connectivity invariants validated at construction (hull.rs
is_valid_hull_impl + create_hull asserts), immutable behind Arc; debug
builds always assert, so every test run exercises the contract. Measured
(paired, retrained PGO): junkyard -3.6%, washer -2%, nothing elsewhere —
documented honestly that the checks were NOT most of the hull residue.
Tests 179 green with and without the feature; hash 0x61E35C31 both.

README: evaluation of the newly-stabilized algebraic float ops idea —
incompatible with the determinism contract as a default (compiler-
version/ISA-dependent results break cross-arch equality and cross-build
replay), modest expected upside since hot paths are already hand-
contracted; possible future opt-in, not planned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 19:55:41 +02:00

22 lines
909 B
TOML

[package]
name = "makepad-box3d"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Rust port of Box3D by Erin Catto (https://github.com/erincatto/box3d)"
[features]
# C: BOX3D_DISABLE_SIMD — build the scalar fallback instead of SSE2/NEON.
disable-simd = []
# C: BOX3D_DOUBLE_PRECISION — large world mode. World positions in f64.
double-precision = []
# Elide bounds checks on hull-topology indexing in the SAT hot loops
# (convex_manifold.rs). The indices come from the hull's own connectivity
# (edge.origin/edge.face/twin, support results), validated when the hull is
# built and immutable afterwards (Arc<HullData>); debug builds still check
# via debug_assert, so the full test suite exercises the contract. This is
# the port's only opt-in unsafe: it matches C's (checkless) indexing on the
# hull-heavy scenes (junkyard/washer). Off by default.
unchecked-hulls = []
[dependencies]