PyO3: Rust Bindings for the Python Interpreter
With PyO3, I built the library to parse datetimes 10x faster than `datetime.strptime` in just a few lines of code: <a href="https://github.com/gukoff/dtparse" rel="nofollow">https://github.com/gukoff/dtparse</a><p>It just calls the Rust's chrono library that does the parsing and wraps the result in a Python object. You can do it for any Rust library, it's very, very easy!<p>The only slightly complicated part is the distribution. You need to use <a href="https://github.com/PyO3/maturin" rel="nofollow">https://github.com/PyO3/maturin</a> or <a href="https://github.com/PyO3/setuptools-rust" rel="nofollow">https://github.com/PyO3/setuptools-rust</a>, and of course, you need to have Rust installed on the wheel-building machine.<p>Feel free to use this repo as a reference if you want to build a similar thing. The code is commented, and there's a working GitHub action that builds the wheels for all platforms and uploads them to PyPi: <a href="https://github.com/gukoff/dtparse/tree/master/.github/workflows" rel="nofollow">https://github.com/gukoff/dtparse/tree/master/.github/workfl...</a>