Port conversion engine to Rust; Python becomes a thin binder#122
Merged
Conversation
Replace the pure-Python converters with a compiled Rust core (num2words2-core via PyO3/abi3); the Python package is now a thin binder that normalises arguments and shapes results. Output is byte-for-byte identical to the previous pure-Python library, validated against a frozen ~150k-case corpus. - Delete the 156 lang_*.py modules + base/currency/converters; keep the binder __init__.py, grouping.py and _version.py. - Vendor the Rust crate under rust/ (num2words2-core + num2words2-py, lib _rust). - Switch the build to maturin (single mixed Rust/Python wheel). - Add a maturin multi-platform release workflow: slim wheels -> PyPI, full wheels (embedded lingua-rs language-detection models) -> GitHub Releases. - Adopt upstream PRs savoirfairelinux#657 (Latin declension), savoirfairelinux#660 (Polish typos), savoirfairelinux#661/savoirfairelinux#666/savoirfairelinux#668/savoirfairelinux#670 (ordinal fixes) and savoirfairelinux#662 (Hindi 10^41 scale). - README: reframe as a Rust port with a Python binder; add a performance section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the pure-Python converters with a compiled Rust core (PyO3/abi3); the Python package is now a thin binder. Output is byte-for-byte identical to the previous pure-Python library (frozen ~150k-case corpus). Adds a maturin multi-platform release workflow (slim wheels to PyPI, full wheels to GitHub Releases) and adopts upstream PRs savoirfairelinux#657/savoirfairelinux#660/savoirfairelinux#661/savoirfairelinux#662/savoirfairelinux#666/savoirfairelinux#668/savoirfairelinux#670. See README + FINDINGS.