-
Notifications
You must be signed in to change notification settings - Fork 758
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
Support for SmallVec
in conversion traits
#3440
Comments
That'd be fine by me. |
Given we have to provide trait implementations here, or thirdparty crates need to provide implementations ( It's probably more practical for us to maintain the conversions here rather than ask N crates to have PyO3 features (you can imagine they then have to support M language binding features). So the bar for what crates to accept needs to be pretty high; so far we've done this case-by-case as long as they're relatively core ecosystem crates which have types which map well onto Python types. The only cost at the moment of not accepting a crate is that all users downstream just have to wrap in newtypes or use |
Add support for `SmallVec` in conversion traits (#3440)
Would the PyO3 project be interested in a PR that adds a
smallvec
feature (akin tohashbrown
andindexmap
) to add conversion traits for the smallvec crate? In some of the higher-performance places I'm using PyO3 I'm moving some structures to smallvec for better cache locality, and at the moment I need to manually convert whenever one of those objects appears at the Python API boundary.I'd be happy to contribute the PR, if it's a feature you'd like to merge. I don't know how you feel about expanding the optional trait implementations to every crate under the sun, though!
The text was updated successfully, but these errors were encountered: