Repository navigation
Conversation
Audit all existing native declarations and shims, translate exceptions, and tie atom, bond and conformer views to their molecule owners. Add graph edits, configurable fingerprints and scaffold networks with regression coverage. Preserve compatible downstream error text and native version semantics. Adapt contributor work from PRs #19, #50, #51, #52, #54 and #56. Co-authored-by: Alexandra Ebberg <aebberg@uni-muenster.de> Co-authored-by: Sharif Haason <sharif.haason@gmail.com> Co-authored-by: Chris Petersen <chris@petersen.io>
This was referenced Oct 9, 2026
Closed
Open
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing shared native handles could expose aliasing mutable atoms, parser nulls could become invalid molecules, and most throwing C++ calls did not translate failures. This draft replaces those handles with exclusive ownership, ties borrowed views to their molecules, and tests a useful chemistry workflow against ordinary Ubuntu RDKit packages.
Behavior and design
UniquePtr,&TandPin<&mut T>throughout the exposed native ownership boundary. Native deep copies preserve independence; consuming RWMol conversion uses C++ base-class conversion instead of Rusttransmute.Sendand!Sync; borrowed views do not gain unsafe thread traits. Periodic valence lists are owned copies; table handles own a small stateless shim, supporting RDKit 2026's deleted native copy constructor.The audit covers all 145 original native declarations, their C++ shims and high-level wrappers. The branch has 189 native callable declarations across 11 modules, listed in the inventory. This is a defined binding subset, with no claim of complete RDKit API coverage or a memory-safety proof.
Native/platform matrix
Verified 2026-10-09. Current upstream is RDKit 2026.09.1, published 2026-10-03; the practical default is a released LTS package.
202503.6-4/ RDKit 2025.03.6202309.3-3build2/ RDKit 2023.09.3202503.1-4/ RDKit 2025.03.12026.09.1+ds1-1~ubuntu26.04Ubuntu 26.10 is still prerelease on this verification date. The build instructions link official dated sources and pin Ubuntu container digests, RDKit package versions, Rust 1.99.0, CXX 1.0.203 through the committed lockfile, and C++20. Prefix discovery is explicit and Cargo tracks its inputs. The activated-Conda feature is forwarded, with distro-prefix feature checks distinguished from a real Conda solve.
Validation
Final-head CI and recorded local validation:
The validation record explains the commands, development failures fixed, and limits. ASan/UBSan instrument the bridge and inlined header code; packaged RDKit and Rust are not rebuilt with sanitizers. Native version differences are asserted explicitly, including canonicalization, periodic-table data and the corrected 2026
chi2n/chi2vregistry results.The reference installer pins the release bundle and published manifest hashes, checks every internal checksum, and installs its exact runtime/development/data packages. This validates GitHub release-artifact installation, using
apt-getfor dependency resolution. The packaging project's separate APT verification passed on both architectures; those native smoke tests are separate from this full binding suite.Final-head CI passed for
0ae060c9cfc14626172070989fee890b16454373: Packaged RDKit passed all four platform jobs, both C++ ASan/UBSan jobs and the requiredtest_suitecheck. C++ formatting also passed. Every platform job passed tests, strict all-targets Clippy, rustdoc and all-features prefix checks. The initial expanded run failed during Docker Hub image pulls; the successful run uses Docker's public ECR mirror with identical pinned digests.Migration and limits
See the migration guide. Low-level callers must adopt unique owners, borrowed inputs and
Result.RWMol::from_smartshas a typed error;Unchargerrequires mutable access; valence lists are owned vectors; unknown sanitize exception kinds have anOthervariant. Molecule borrow rules intentionally prevent formerly aliasing access. The historicaltanimoto_distancename remains a similarity alias.Outstanding scope includes dedicated ring APIs/additional named descriptors, 3D embedding/ETKDG/ensembles, MMFF/UFF, standalone Murcko helpers, reactions and other broad upstream areas. Windows, macOS and real Conda installation remain unvalidated. Arm64 scope is the new reference-package CI job; local and sanitizer checks run on amd64. Native chemistry data/algorithms can change between RDKit versions; binary ABI interchangeability is not promised.
Contributor work and triage
This adapts and credits useful work from #19, #45, #50, #51, #52, #54 and #56. The scaffold implementation/tests in #56 and atom/bond/fingerprint direction in #50–#54 were reworked around the ownership contract. Full attribution is in the audit and relevant commit trailers.
All 10 open issues and 10 open PRs were enumerated with pagination, including a second empty page for each collection, and their discussions/diffs/status reviewed. Pending fixes stay open until they land; partial work such as #53, #54 and #55 is not treated as resolved.
No new code comments, crate version bumps, releases, tags, merges or deployment are included. This remains a draft for review.
Complete triage ledger
All actions below were posted after reviewing the paginated open collections, discussions, diffs and current status. Closures do not imply the draft's pending code has merged.