# goldenmatch-native

> Compiled Rust/PyO3 acceleration kernels for GoldenMatch entity resolution.

## What this package is

A compiled companion wheel for **goldenmatch**. You do not import it directly --
`goldenmatch` discovers it at runtime. This directory contains a compiled abi3
extension and almost no readable Python, so reading it will not tell you what it does.

## Authoritative sources

Read these instead of inferring behaviour from the binary or from the host's fallback path:

- https://docs.bensevern.dev/docs/goldenmatch -- documentation for this surface.
- `goldenmatch/llms.txt` -- ships inside the goldenmatch wheel (`Path(goldenmatch.__file__).parent / "llms.txt"`), written for machine readers.
- https://docs.bensevern.dev/docs/llms.txt -- index of every Golden Suite surface.
- https://github.com/benseverndev-oss/goldenmatch -- source, issues, and the decision records behind the behaviour.

## Install

```bash
pip install goldenmatch[native]   # pulls goldenmatch-native
```

## Runtime gate

- `GOLDENMATCH_NATIVE=auto` (default) -- use the kernel where it exists, fall back otherwise.
- `GOLDENMATCH_NATIVE=0` -- force the pure-Python fallback.
- `GOLDENMATCH_NATIVE=1` -- require the kernel; raise if it is missing.

Discovery lives in `goldenmatch.core._native_loader`.

## Notes

- Rust is the REFERENCE implementation for the kernels it covers; the pure-Python path is the documented fallback, not a co-equal source of truth. So a behaviour you read off the Python side may be the fallback's, not the shipped one.
- FS block scoring is native-authoritative separately via `GOLDENMATCH_FS_NATIVE` (default on).

This wheel exists because a behaviour was *decided* -- which surface owns a computation,
which fallback is deliberate, which parity is contract-tested. Those decisions are
documented; the compiled artefact cannot tell you about them.
