fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

Add pyo3 feature forwarding #43

Open jam1garner opened 3 years ago

jam1garner commented 3 years ago

This is to allow users to directly control the features of the pyo3 instance used by inline-python without adding it as a direct dependency (and thus risking the versions of pyo3 drifting out of date without pinning both libraries versions). This is especially useful as inline-python re-exports pyo3.

The format used is "pyo3-{featurename}", following the kebab case of pyo3's features.

de-vri-es commented 3 years ago

Hey, thanks for the PR! I can certainly see the point of this, but I'm a little worried that we'll forget to keep it in sync in the future.

@m-ou-se: What do you think?

jam1garner commented 3 years ago

If keeping all the features in sync is a worry I would, at minimum, recommend forwarding the macros feature—without it you lose a lot of the ability to integrate with pyo3 (exposing user types/functions to python)