Skip to main content

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 eccodes with import 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_file
  • codes_new_from_file
  • codes_any_new_from_file
  • codes_count_in_file
  • codes_get, codes_get_long, codes_get_double, codes_get_string
  • codes_get_array, codes_get_double_array, codes_get_long_array
  • codes_get_values
  • codes_is_defined, codes_is_missing
  • codes_get_size, codes_get_offset, codes_get_message_offset, codes_get_message_size
  • codes_get_native_type
  • codes_keys_iterator_*
  • codes_skip_*
  • codes_clone, codes_release

Performance note:

  • codes_get_values and 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. After cargo build --release, copy target\release\_ecrust.dll over that file before rerunning Python-side checks.
  • Plain Windows release builds now default to mimalloc because the system allocator was materially slower on the HRRR workload. Use cargo build --release --features system-allocator only 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-dir paths to the benchmark scripts.
  • Non-Windows builds still default to the system allocator. Use maturin develop --release --features mimalloc or cargo build --release --features mimalloc only when comparing allocators.
  • On Ubuntu 24.04 WSL with Rust 1.94.1, maturin develop --release hit a rustc warning-emission ICE. RUSTFLAGS="-Awarnings" maturin develop --release worked 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 runs pytest -q.
  • The parity suite now also includes pinned official operational ECMWF, GFS, and RRFS near-surface GRIB2 subsets, assembled from published .idx / .index sidecars 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, and codes_write now 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 eccodes binding function

Release checklist:

  1. Set the final GitHub repository URL in package metadata once the repo is online.
  2. Push the branch and confirm .github/workflows/ci.yml is green on Linux and Windows.
  3. Configure trusted publishing for this repo on TestPyPI and PyPI, or provide the equivalent publish credentials expected by .github/workflows/release.yml.
  4. Run .github/workflows/release.yml with publish_to=testpypi for a dry-run package upload.
  5. Verify pip install ecrust from the published TestPyPI build on Windows and Linux.
  6. Push a vX.Y.Z tag that matches the package version to build Linux x86_64 manylinux wheels, Windows x64 wheels, 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)

Source distribution for ecrust 0.1.0
File Size Uploaded
ecrust-0.1.0.tar.gz 88.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ecrust 0.1.0
File
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 log

Release 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 log

Release 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 log

Release 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 log

Release 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 log

Release 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 log

Release 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 log

Release 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 log

Release 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

Release history Release notifications | RSS feed

This release

0.1.0 This release

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page