ecrust
Rust-native Python package that targets the low-level eccodes import surface
for modern GRIB workflows.
Current benchmark and handoff state for follow-on work lives in AGENT_CONTEXT.md.
The latest Windows HRRR benchmark there shows ecrust ahead of ecCodes on both
the single-file end-to-end values path and the 4-copy multi-file run.
GitHub CI for release verification now lives in .github/workflows/ci.yml.
Goal:
- replace
import eccodeswithimport ecrust - keep the common
codes_*handle/get/release flow unchanged - avoid a native ecCodes C-library dependency
For the supported GRIB workflows, ecrust is a pure-Rust path and does not
require linking against the ecCodes C library.
Current implemented surface:
codes_grib_new_from_filecodes_new_from_filecodes_any_new_from_filecodes_count_in_filecodes_get,codes_get_long,codes_get_double,codes_get_stringcodes_get_array,codes_get_double_array,codes_get_long_arraycodes_get_valuescodes_is_defined,codes_is_missingcodes_get_size,codes_get_offset,codes_get_message_offset,codes_get_message_sizecodes_get_native_typecodes_keys_iterator_*codes_skip_*codes_clone,codes_release
Performance note:
codes_get_valuesand native/double"values"array access now return read-only NumPy arrays backed by Rust-owned memory to avoid an extra copy on the hot path.codes_get_version_info()and the benchmark scripts now report allocator and target metadata so performance reruns are attributable to a concrete build variant.
Windows dev note:
- Local Python tests and benchmarks load
python\ecrust\_ecrust.cp313-win_amd64.pyd. Aftercargo build --release, copytarget\release\_ecrust.dllover that file before rerunning Python-side checks. - Plain Windows release builds now default to
mimallocbecause the system allocator was materially slower on the HRRR workload. Usecargo build --release --features system-allocatoronly for A/B comparison.
Linux / WSL dev note:
- For Linux validation, run benchmarks from the distro filesystem rather than
/mnt/c, and pass explicit--source/--copy-dirpaths to the benchmark scripts. - Non-Windows builds still default to the system allocator. Use
maturin develop --release --features mimallocorcargo build --release --features mimalloconly when comparing allocators. - On Ubuntu 24.04 WSL with Rust
1.94.1,maturin develop --releasehit a rustc warning-emission ICE.RUSTFLAGS="-Awarnings" maturin develop --releaseworked around it.
Verification note:
- The local parity suite now includes focused drop-in API coverage in
tests/test_dropin_surface.py, and the repository includes a Linux/Windows GitHub Actions workflow that builds the extension and runspytest -q. - The parity suite now also includes pinned official operational ECMWF, GFS,
and RRFS near-surface GRIB2 subsets, assembled from published
.idx/.indexsidecars via HTTP range requests so CI verifies real model data without downloading full upstream files.
Current scope:
- GRIB1 and GRIB2 decode
- modern GRIB metadata and value access
- GRIB2 mutation and write-back for common sample and real-world workflows:
codes_set_*,codes_get_message, andcodes_writenow repack common GRIB2 messages and patch original section metadata instead of only exposing shadow state through getters - expanded real-world parity coverage against the cfgrib sample corpus plus pinned official ECMWF/GFS/RRFS operational subsets, with broad modern GRIB message compatibility checks and mutation round-trip tests
- pure-Rust decode path, including JPEG2000 and CCSDS/AEC support through Rust crates
Current non-goals:
- BUFR, METAR, and GTS support
- full GRIB write/repack parity across every grid/packing/template combination
- the full long-tail of every historical
eccodesbinding function
Release checklist:
- Set the final GitHub repository URL in package metadata once the repo is online.
- Push the branch and confirm
.github/workflows/ci.ymlis green on Linux and Windows. - Configure trusted publishing for this repo on TestPyPI and PyPI, or provide the equivalent publish credentials expected by
.github/workflows/release.yml. - Run
.github/workflows/release.ymlwithpublish_to=testpypifor a dry-run package upload. - Verify
pip install ecrustfrom the published TestPyPI build on Windows and Linux. - Push a
vX.Y.Ztag that matches the package version to build Linuxx86_64manylinux wheels, Windowsx64wheels, and an sdist, upload them to the GitHub release, and publish to PyPI.
Known remaining GRIB gap:
- GRIB1 spectral-complex packing (
spherical_harmonics.grib) is still not implemented
Release files for ecrust 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ecrust-0.1.0.tar.gz | 88.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| ecrust-0.1.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| ecrust-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.17+ x86-64 | Details |
| ecrust-0.1.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| ecrust-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details |
| ecrust-0.1.0-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| ecrust-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ x86-64 | Details |
| ecrust-0.1.0-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| ecrust-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 4.4 MB
Release files / ecrust-0.1.0.tar.gz
| Download URL | ecrust-0.1.0.tar.gz |
|---|---|
| Size | 88.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9311882c12839603bd82881caf6739bde197216c4223d800ae71a833660cdaf4
|
|
BLAKE2b-256 checksum How to use checksums |
362f6ad4787860ee28ba5d9e4da02cb762e3f7e6c2c8cfeca2e8fb98de0d06bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | ecrust-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 527.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
505e8334df57e7b9d27ec37a852d19f709cf10bf69ebcae84648df70c99b0a7c
|
|
BLAKE2b-256 checksum How to use checksums |
aa0e84ff030ba9fa0677e31792a660f633a80ba7b975fd3c672a536717bb87d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ecrust-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 545.3 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8805f33e694e966ab80525eb54dbe7df169581b3321124ec4f6206c3c6647970
|
|
BLAKE2b-256 checksum How to use checksums |
037de53956bb771172f973e0a35eb7e08c8079c575103e05764cf95964b44cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | ecrust-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 528.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7c79fc79da6433f8cb3c9d245627bc8813484d065f1729466793cc5cdb0b19da
|
|
BLAKE2b-256 checksum How to use checksums |
dfe66153d010a409730d85ec4360c762f6e1d68da1606367441f1527a8f82e08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ecrust-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 545.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
07390347c49d1d5fef96e1245c8fb94622d0229d7edb18680a42523b1d0b1dd4
|
|
BLAKE2b-256 checksum How to use checksums |
cb20b9375bf3e59065429fbdc49189e4a99b42ed5dc466a4aacc288b194e3c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | ecrust-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 527.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
91c67e0621631134a18c2e967c5261a9f6a7b4aa9a650118a9f1e70955eb5a56
|
|
BLAKE2b-256 checksum How to use checksums |
c9b6abd7dde66645abd03220e80f67a46f095ce4038b0a61ef386af316b47767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ecrust-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 546.7 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c7af09ed102b5a25f776f9554d14810f0070d55b7ad5739e1c708f6b85d06523
|
|
BLAKE2b-256 checksum How to use checksums |
4c9a99e2613a73a7f79d9ceabf7a53a9ab9a3730ee9aa4a13d91fee778907c42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | ecrust-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 527.5 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8d622e0e8fde25e72f6e3323571b0c95b5d995719437425b91ebc37f2dce0021
|
|
BLAKE2b-256 checksum How to use checksums |
d51a2fc972c4a909842326e19a34c06c840ef65be1f70e8b7124cac999f0ab7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / ecrust-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ecrust-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 546.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
75f0a9da74ef746f16715166124178221d3eb216f613962d77e9c2e268775e88
|
|
BLAKE2b-256 checksum How to use checksums |
2ef15936b54526cf973af2347a95623c6a1b0928bd7199a2ee179f188549b95f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency log