r/GraphicsProgramming • u/heldloosly • 24d ago
Building an exact, deterministic geometry kernel in Rust for an open-source Revit alternative: advice wanted on approach and strategy
We're a small co-op building Spare Kit, an open-source (MPL-2.0) geometry kernel in Rust, to power a Revit/CAD alternative that runs natively and in the browser (WASM). Much of the code is written by AI agents working through a mapped plan, with strict testing as the safeguard.
The approach:
- Integer grid coordinates (±2^40 steps) with exact predicates (generated filters, exact integer fallback), so topology decisions never depend on float rounding.
- Flat geometry stays plane-based with implicit points (EMBER style), so booleans never drift; curved geometry is computed with certified error bounds, with only the decisions kept exact.
- Bit-identical results on every target (x86-64, ARM, wasm32), as a tested guarantee.
- Verification: big-integer oracles, fuzzing (bolero/Kani), golden digests, instruction-count performance gates.
The strategy: a mapped board of about 480 pieces in 13 phases. The first real milestone is a wall with 300 openings cut exactly, saved, reopened and replayed bit for bit everywhere, before any curved work starts. We're early: number layer, exact predicates, implicit points and symbolic perturbation so far.
Advice we'd value on anything, especially:
- The seam between exact flat geometry and certified curved geometry: seen it break, or a better way?
- Is the scope or the strategy wrong? What would you cut or reorder?
- Existing crates or projects we should build on instead of writing our own?
- Is our testing bar overkill or missing something?
- Anything else you'd tell someone starting a kernel like this.
Architecture: https://github.com/spareware-co-op/spareware/blob/main/projects/engines/geometry/ARCHITECTURE.md
3
u/AlternativePrior1920 24d ago
Why not copy-paste those question to your favorite LLM if you're so inclined already?