Skip to content

Ponder a rust future#109

Draft
timj wants to merge 2 commits into
mainfrom
u/timj/rust
Draft

Ponder a rust future#109
timj wants to merge 2 commits into
mainfrom
u/timj/rust

Conversation

@timj

@timj timj commented Jun 15, 2026

Copy link
Copy Markdown
Member

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

timj and others added 2 commits June 13, 2026 12:31
Design a phased migration of sphgeom's implementation to a canonical Rust
core, with three end-state consumers: native Rust, Python via PyO3, and
downstream C++ via the existing headers plus a thin delegation veneer.

During the migration the public build is left untouched; the Rust path is
exercised as a development aid (a parallel PyO3 `_sphgeom2` extension
selected by an environment variable) so the existing Python suite can
validate it with no effect on what anyone installs. The end-state
packaging (maturin pure-Rust PyPI wheel, plus CMake-built libsphgeom under
conda-forge for downstream C++) and the C++ veneer are deferred to a
dedicated cutover phase. Records the C ABI bridge contract, the
bit-identical parity contract, the build model, the roadmap, and a
plan-ready Phase 0 (orientation predicates) slice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plan the first migration slice as a development aid that leaves the public
build untouched: port the orientation predicates to a Rust core crate
(Rust edition 2024, num-bigint for the exact fallback), expose them through
an optional PyO3 `_sphgeom2` extension, and route the ported names through
it via the SPHGEOM_RUST environment variable in __init__.py. Validate with
a golden-vector differential harness (Rust vs current C++, bit-identical)
and a Python parity test. Enforce cargo fmt and cargo clippy (-D warnings)
via pre-commit hooks and CI. No C ABI, C++ glue, libsphgeom linking, or
public build-file changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.44%. Comparing base (482271f) to head (a138338).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   72.44%   72.44%           
=======================================
  Files         115      115           
  Lines        7215     7215           
  Branches     2289     2289           
=======================================
  Hits         5227     5227           
  Misses        404      404           
  Partials     1584     1584           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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