Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider building abi3 wheels #80

Open
adamreichold opened this issue Jun 21, 2023 · 6 comments
Open

Consider building abi3 wheels #80

adamreichold opened this issue Jun 21, 2023 · 6 comments

Comments

@adamreichold
Copy link
Collaborator

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.

@cjrh
Copy link
Collaborator

cjrh commented Jun 21, 2023

It's a good idea, we should do this.

@cjrh
Copy link
Collaborator

cjrh commented Jul 21, 2023

fyi @wallies - since we're planning on a new release soon anyway maybe now is a good time to do this.

@cjrh
Copy link
Collaborator

cjrh commented Aug 26, 2023

Had a look. Sadly, PyDateTime for now is not supported in the limited ABI and we use it in document.rs.

@guilload
Copy link
Member

@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.

@cjrh
Copy link
Collaborator

cjrh commented Mar 19, 2024

Apparently there is some kind of fallback support for datetime described in this PR: PyO3/pyo3#3633. I need to look at it but perhaps there's a path for us.

@adamreichold
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants