PyO3 extension: native local scorer for sparkrules Tier-1
Project description
sparkrules-native (Rust Tier-1 scorer)
PyO3 extension implementing the Tier-1 scalar interpreter described in docs/CHOOSING_A_BACKEND.md. It reads rule AST JSON emitted by SparkRules Python (RulePack.to_native_json()) — the DRL lexer/parser stays on the Python side.
Build (local)
cd sparkrules_native
python -m venv .venv
.venv\\Scripts\\activate # Windows
pip install maturin
maturin develop --release
python -c "import sparkrules_native as m; print(m.native_version())"
Parity
All scores must match LocalRuleExecutor.score() for the same fact dict / JSON-able structure. Run:
pytest tests/integration/test_native_parity.py -q
Consumers (no PyPI yet)
Until https://pypi.org/project/sparkrules-native/ resolves, use:
native-wheels.ymlartifacts (.whl per OS/Python), ormaturin develop --release/maturin build --releaselocally.
See docs/NATIVE_TIER1.md (PyPI verification commands, Glue --extra-py-files, artifact names).
Publish to PyPI (maintainers)
The crate is CI-built (.github/workflows/native-wheels.yml) but not automatically published. publish-sparkrules-native.yml has no effect until the secret exists and the workflow run finishes green; then confirm the project on PyPI.
- Create a
PYPI_API_TOKENPyPI token secret on the GitHub repo (maturin readsMATURIN_PYPI_TOKEN; the workflow wiressecrets.PYPI_API_TOKENinto it). - Run
publish-sparkrules-native.ymlvia Actions → workflow_dispatch. - Restore
sparkrules[native]in rootpyproject.toml(native = ["sparkrules-native>=0.1.0,<1.0"]) oncepip install sparkrules-nativeworks from PyPI.
Tier 2+
src/eval_columnar.rs is reserved for an Arrow batch path; not implemented in Tier-1.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparkrules_native-0.1.0.tar.gz.
File metadata
- Download URL: sparkrules_native-0.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65d9778924c1a38ee6b3aa8a179ad89246d3ac183b5491464ae59712d5e41b53
|
|
| MD5 |
6c70032279e28d082bc6795c02b3bfae
|
|
| BLAKE2b-256 |
3e3dd280b97d1dfe6958450b0ce97733129764ef9f0bbee7e7a0d4a97d8cd322
|
Provenance
The following attestation bundles were made for sparkrules_native-0.1.0.tar.gz:
Publisher:
publish-sparkrules-native.yml on vaquarkhan/sparkrules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparkrules_native-0.1.0.tar.gz -
Subject digest:
65d9778924c1a38ee6b3aa8a179ad89246d3ac183b5491464ae59712d5e41b53 - Sigstore transparency entry: 1444896975
- Sigstore integration time:
-
Permalink:
vaquarkhan/sparkrules@0df391f89386a79c7d96ed536f948f5cdd30fab1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vaquarkhan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sparkrules-native.yml@0df391f89386a79c7d96ed536f948f5cdd30fab1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sparkrules_native-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: sparkrules_native-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 951.5 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
976bbc193925268557447dbd1fca0952e36e9daac2c5bdfe343d9d0098ca73cf
|
|
| MD5 |
b3b4f27f6b527d1110f8de44c1d4d94f
|
|
| BLAKE2b-256 |
caf0687eb1e9f003661213ebdf861e624f69d9af12da360934a418ebef6574f2
|
Provenance
The following attestation bundles were made for sparkrules_native-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl:
Publisher:
publish-sparkrules-native.yml on vaquarkhan/sparkrules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparkrules_native-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
976bbc193925268557447dbd1fca0952e36e9daac2c5bdfe343d9d0098ca73cf - Sigstore transparency entry: 1444897072
- Sigstore integration time:
-
Permalink:
vaquarkhan/sparkrules@0df391f89386a79c7d96ed536f948f5cdd30fab1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vaquarkhan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sparkrules-native.yml@0df391f89386a79c7d96ed536f948f5cdd30fab1 -
Trigger Event:
workflow_dispatch
-
Statement type: