pymatching-cxx
pymatching-cxx is the low-level C++ bridge crate for pymatching-rs.
The crate vendors upstream PyMatching as a git submodule at vendor/pymatching, pins it to commit c60642af5a5b342d633e2e2b818b9fdb9696e828, and builds a small cxx smoke bridge that exercises the native toolchain on Linux.
Release builds first try a SHA256-verified, target-specific static PyMatching
library from the matching GitHub release. Unsupported targets, offline builds,
and failed downloads compile the packaged C++ source instead. Set
PYMATCHING_RS_BUILD_FROM_SOURCE=1 to force the fallback, or
PYMATCHING_RS_PREBUILT_DIR=/path/to/libs to use a local archive.
pymatching-cxx depends directly on stim-cxx. When an application also uses
the safe stim crate at a compatible version, Cargo resolves one stim-cxx
package and reuses its single native Stim build for both crates. The matching
Stim headers are discovered through CXX dependency metadata. Set
STIM_RS_VENDOR_DIR only when developing both crates against an alternate Stim
checkout.
For local overrides, set PYMATCHING_RS_VENDOR_DIR to point at an alternate PyMatching checkout before running Cargo.