v0.1.1 — Simplify refactor + macOS x86_64 CLI
Highlights
~2-3% faster encoder (10.58 → 10.34 μs for neptune 50-doc payload) via code simplification, and the macOS x86_64 CLI binary is back.
Changes since v0.1.0
Performance
- Extract
write_value_after_keyhelper — unified duplicate dispatch logic, eliminated ~18 lines - Change
table_keysto borrow input viaVec<&'a str>— saves 5Stringallocations per tabular array - Tighter buffer capacity bound (
input.len()is a safe upper bound since TOON ≤ JSON size)
Fixes
- Build macOS x86_64 CLI binary using
macos-14runner with cross-compile target (macos-13runner was deprecated by GitHub Actions) - Re-enable
crates.iopublish in release workflow (now thatCARGO_REGISTRY_TOKENis configured)
Benchmarks (neptune 50-doc payload)
| Encoder | Time | vs etoon |
|---|---|---|
| etoon v0.1.1 (Python) | ~13 μs | baseline |
| @toon-format/toon (TS SDK) | 35.6 μs | 2.73× slower |
| py-rtoon | 85.9 μs | 6.6× slower |
| toons | 106.4 μs | 8.2× slower |
Install
pip install --upgrade etoon # Python
cargo add etoon --no-default-features # Rust library
cargo install etoon --no-default-features # Rust CLI from sourceCLI binary downloads below ↓
Full Changelog: v0.1.0...v0.1.1