·
4 commits
to refs/heads/master
since this release
AGON v0.2.0
What's Changed
- Feat/rust bindings @Verdenroz (#6)
- Full Changelog: v0.1.0...v0.2.0
Supported platforms:
- Linux: x86_64, aarch64 (manylinux)
- macOS: x86_64 (Intel), aarch64 (Apple Silicon)
- Windows: x64
- Python: 3.11, 3.12, 3.13
Rust Core Implementation
The entire encoding/decoding engine has been rewritten in Rust (~4,000 lines) and exposed via PyO3:
AGONRows: Row-based tabular encodingAGONColumns: Columnar transpose encodingAGONStruct: Template-based encoding- Parallel format evaluation with rayon
- Fast byte-length token estimation (opt-in tiktoken)
Format Rename: AGONText → AGONRows
from agon import AGON, AGONRows
# New (recommended)
result = AGON.encode(data, format="rows")Token Counting Options
# Fast estimation (default, uses len/4 heuristic)
result = AGON.encode(data, format="auto")
# Accurate tiktoken counting (slower but precise)
result = AGON.encode(data, format="auto", encoding="o200k_base")Documentation
- Full docs: https://verdenroz.github.io/agon-python/
- API Reference: https://verdenroz.github.io/agon-python/api/
- Benchmarks: https://verdenroz.github.io/agon-python/benchmarks/
For Contributors
Development now requires the Rust toolchain:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build and test
uv sync --dev
make build
uv run pytestFull Changelog
Added
- Rust core implementation with PyO3 bindings (
crates/agon-core/) - Parallel format evaluation using rayon
- Fast byte-length token estimation as default
- Cross-platform wheel builds (Linux, macOS, Windows)
- Comprehensive performance benchmarks in documentation
Changed
- Renamed
AGONText→AGONRowsthroughout codebase and docs - Moved Python code from
src/topython/ - Updated CI/CD for Rust + Python hybrid builds
- Pre-commit hooks now include Rust linting