Rust acceleration layer for agora-etl — high-throughput record dispatch
Project description
agora-etl-rs
agora-etl-rs is the optional Rust acceleration layer for
agora-etl.
It speeds up proven hot paths in the Agora runtime while preserving the same pipeline semantics, recovery behavior, and public builder model. The goal is not to create a second runtime. The goal is to make the existing runtime cheaper to execute.
agora-etl 0.4.x discovers this package automatically when it is installed.
Most teams should interact with it through agora-etl, not by wiring the Rust
classes directly.
What Ships in 0.2.0
agora-etl-rs 0.2.0 provides capability metadata plus native implementations
for selected runtime primitives:
record_buffermetrics_accumulatorlinear_batch_buffercheckpoint_statememory_tracersync_builtin_chain_executorcsv_arrow_writerjsonl_arrow_writerjsonl_arrow_reader
These capabilities are consumed by agora-etl 0.4.x through its acceleration
facade and surfaced in explain output, run summaries, and agora doctor.
When to Install It
Install agora-etl-rs when a pipeline is CPU-sensitive enough that Python-side
buffering, metrics, or batch bookkeeping show up in profiles, or when a run
must fail fast if acceleration is unavailable.
Do not install it expecting different runtime semantics. agora-etl-rs should
make hot paths faster, not change how a pipeline behaves.
Requirements
- Python
>= 3.11 agora-etl >= 0.4.0,<1- A supported CPython runtime
Installation
Install both packages explicitly:
pip install agora-etl agora-etl-rs
Or use the convenience extra from agora-etl:
pip install "agora-etl[rs]"
Verifying the Extension
Check that the native module is importable:
from agora_rs import RUST_AVAILABLE, capabilities, is_available, version
print(RUST_AVAILABLE) # True when the extension loaded
print(is_available()) # True when native bindings are active
print(version()) # "0.2.0"
print(capabilities()) # tuple[str, ...]
When the extension is unavailable, agora_rs still exposes compatibility
stubs so package metadata can be inspected safely. In that state:
RUST_AVAILABLEisFalseis_available()returnsFalsecapabilities()returns()
Using It Through agora-etl
agora-etl-rs is selected by agora-etl through the acceleration boundary in
agora 0.4.x.
Declarative configuration:
[performance]
acceleration = "auto" # auto | off | required
profile = "balanced" # balanced | throughput | low_latency
Code-level configuration:
from agora import DeliveryConfig, Pipeline
bound = Pipeline(source).build(
sink,
config=DeliveryConfig(
acceleration_mode="required",
performance_profile="throughput",
),
)
Interpretation:
autouses compatible Rust paths when installedoffforces pure-Python execution for debugging or comparisonrequiredfails before source or sink open if acceleration is unavailable
Useful places to inspect the chosen fast path:
explain = pipeline.explain()
print(explain.acceleration.to_dict())
summary = await pipeline.run()
print(summary.runtime.to_dict())
From the CLI:
agora doctor --config agora.toml
agora doctor --json --config agora.toml
Public Python Surface
Most users only need:
agora_rs.__version__agora_rs.version()agora_rs.capabilities()agora_rs.is_available()agora_rs.RUST_AVAILABLE
Advanced users and internal integration tests may also use the native classes directly:
RecordBufferMetricsAccumulatorLinearBatchBufferCheckpointStateInMemoryTracerSyncBuiltinChainExecutorCsvArrowWriterJsonlArrowWriterread_jsonl_record_batches(...)
That surface is lower-level than agora-etl and should be treated as an
acceleration substrate, not a replacement for the main builder API.
What It Accelerates
| Area | Python path | Rust path |
|---|---|---|
| Source prefetch buffering | asyncio.Queue style coordination |
bounded record buffer with native synchronization |
| Runtime metrics counting | Python-side per-record updates | batched native accumulation |
| Linear write batching | Python list and bookkeeping objects | native batch buffer |
| Checkpoint cadence checks | Python object bookkeeping | native checkpoint state helper |
| In-memory tracing helpers | Python span storage | native span container |
| Built-in sync middleware chain | Python dispatch loop | native chain executor |
| CSV / JSONL Arrow file paths | Python fallback path | native writer / reader helpers |
Not every run will activate every primitive. agora-etl decides that per lane,
per writer shape, and per performance profile.
Building From Source
This package lives inside the Agora monorepo.
git clone https://github.com/thanhtham010891/agora-etl.git
cd agora-etl/packages/agora-rs
Create a virtual environment and install build tooling:
python3.11 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install "maturin>=1.0,<2" "pytest>=8.0" "pytest-asyncio>=0.24"
Build and install the extension into the active environment:
maturin develop --release
Build distributable artifacts:
maturin build --release --out dist
maturin sdist --out dist
Testing and Quality Checks
Run the Python test suite:
pytest tests/ -v
Run Rust formatting and linting:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test is not the primary test entrypoint here because the package uses
pyo3 abi3 bindings and the meaningful coverage lives in the Python-driven
integration tests after a maturin build.
Release Notes
The release workflow expects the GitHub release tag to match the package version exactly:
v0.2.0
Artifacts published by CI include:
- platform wheels
- source distribution
License
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 Distributions
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 agora_etl_rs-0.2.0.tar.gz.
File metadata
- Download URL: agora_etl_rs-0.2.0.tar.gz
- Upload date:
- Size: 37.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 |
56500e8418a792a4b4e112ed6feee95cdd57a79ffee751a5d7e901873e4bfd8a
|
|
| MD5 |
cd624004fdfb10a9a3dec6ce5b3f8a87
|
|
| BLAKE2b-256 |
c34ef3359efb2052e43b6b770d7fbdf02a5c6268cac8df06133be47e109e7181
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0.tar.gz:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0.tar.gz -
Subject digest:
56500e8418a792a4b4e112ed6feee95cdd57a79ffee751a5d7e901873e4bfd8a - Sigstore transparency entry: 1839920021
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agora_etl_rs-0.2.0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: agora_etl_rs-0.2.0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 825.5 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f4331ff5f1420f196b5733f9511a6e81fdf2cea347777a62ed6cd03d841b116
|
|
| MD5 |
9f892deb34945bffcceedda6197f21b3
|
|
| BLAKE2b-256 |
0e340c459a26016724bd1eb2bf5a204ad0cc3bf32310f038baf769d9108363ca
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0-cp311-abi3-win_amd64.whl:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0-cp311-abi3-win_amd64.whl -
Subject digest:
4f4331ff5f1420f196b5733f9511a6e81fdf2cea347777a62ed6cd03d841b116 - Sigstore transparency entry: 1839920065
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agora_etl_rs-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: agora_etl_rs-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a5327b662fb210d4853ef2a7cfa7405ce83d58eaaffaabb9a985bbb4d155b7a
|
|
| MD5 |
a45267c71a7563e1ef749b3354bc956c
|
|
| BLAKE2b-256 |
250eb31ff401ad42178190c8cf2ed27eff84a49af4ac7a66e1ac0dba1b90a3f0
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
3a5327b662fb210d4853ef2a7cfa7405ce83d58eaaffaabb9a985bbb4d155b7a - Sigstore transparency entry: 1839920226
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 952.5 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf570791b0753ebe8a4634d378be3ccea57558957249be2cf5f5e83264296b9
|
|
| MD5 |
b1c5e90e2cb0ae6735982d9ea895452b
|
|
| BLAKE2b-256 |
f1bf08deb681f8e653991a091ea953ed17e1c7ed12df925cf2f8758a0e0eaf9f
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
5cf570791b0753ebe8a4634d378be3ccea57558957249be2cf5f5e83264296b9 - Sigstore transparency entry: 1839920204
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 909.6 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f68420b6643eebe4a99f821d7f6ed52ec8d37687bad7b068b20c0b5239254e78
|
|
| MD5 |
4e9e7a0fc76f24ae99a57d2e7318d607
|
|
| BLAKE2b-256 |
70fa7a7c43deb24f8fb58becba5ec46d018e0c7bf7c096def2011cdfad66cdca
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
f68420b6643eebe4a99f821d7f6ed52ec8d37687bad7b068b20c0b5239254e78 - Sigstore transparency entry: 1839920159
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agora_etl_rs-0.2.0-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: agora_etl_rs-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 854.7 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5d294711b89cc364166bb9f35ac96dd0db14cee33a0300c2a5ce2a144342447
|
|
| MD5 |
3bcb6a0f4f4dcab540503395fe196a10
|
|
| BLAKE2b-256 |
c157441b74de191100efb44474cc0ac23802e536b7ac5aef7c04b54d417bdbf5
|
Provenance
The following attestation bundles were made for agora_etl_rs-0.2.0-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on thanhtham010891/agora-etl-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agora_etl_rs-0.2.0-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
b5d294711b89cc364166bb9f35ac96dd0db14cee33a0300c2a5ce2a144342447 - Sigstore transparency entry: 1839920115
- Sigstore integration time:
-
Permalink:
thanhtham010891/agora-etl-rs@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/thanhtham010891
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fecb9e7ce2b161b94021fd925eb6b97d68d7a4f6 -
Trigger Event:
release
-
Statement type: