v0.1.0 — Initial public release
translit-rs 0.1.0
Fast Unicode transliteration, slugification, and text normalization — powered by Rust.
Highlights
- Transliteration — Unicode → ASCII for Latin, Cyrillic, Greek, CJK (Chinese pinyin, Korean romanization, Japanese kana), and 37 language-specific profiles
- Slugification — URL-safe slugs with python-slugify parameter compatibility
- Filename sanitization — Cross-platform safe filenames with path traversal protection
- Text normalization — NFC/NFD/NFKC/NFKD, confusable homoglyph detection (TR39), full Unicode case folding, whitespace collapse
- Precompiled pipelines —
security_clean,ml_normalize,catalog_key,display_clean - Grapheme clusters — Correct user-perceived character counting, splitting, and truncation
- Encoding detection — Auto-detect and decode byte sequences to UTF-8
Performance
| Operation | Throughput | vs. legacy |
|---|---|---|
| Transliterate (Latin) | 693M chars/sec | 58× faster than Unidecode |
| Transliterate (Cyrillic) | 196M chars/sec | 27× faster than Unidecode |
| Slugify | 1.12M slugs/sec | 10–24× faster than python-slugify |
Install
pip install translit-rsWheels for Linux (x86_64, aarch64), macOS (Intel, ARM64), and Windows. Python 3.9+.