tantivy-py
tantivy-py copied to clipboard
Consider building abi3 wheels
To reduce build effort and improve portability, PyO3 supports building in "abi3" mode where Python's stable ABI/API is used which makes the resulting binary wheels forward-compatible beginning at a specified Python version, e.g. wheels using the abi3-py38 feature are compatible with Python 3.8 and later.
This can cost some performance if there is a lot of back and forth between Rust and Python code, but whether that cost is significant for this extension is hard to say without measuring it.
It's a good idea, we should do this.
fyi @wallies - since we're planning on a new release soon anyway maybe now is a good time to do this.
Had a look. Sadly, PyDateTime for now is not supported in the limited ABI and we use it in document.rs.
@cjrh, @wallies, would you mind joining the #tantivy-py channel on the Quickwit Discord server. There have been many questions regarding tantivy-py on the server lately, and we thought you'd be interested in those conversations.
Apparently there is some kind of fallback support for datetime described in this PR: https://github.com/PyO3/pyo3/issues/3633. I need to look at it but perhaps there's a path for us.
Indeed @Tpt contributed a fully abi3-compatible variant of PyO3's chrono integration feature which means that it can be used for these builds with only a slight performance degradation using exactly the same Rust-side API.