TheButlah / rules_pyo3

Bazel rules to build python extensions with Rust's PyO3 package
MIT License
7 stars 4 forks source link

Updated examples #2

Open liningpan opened 1 year ago

liningpan commented 1 year ago

Hi @TheButlah, there are two more updated example for using PyO3 with Bazel.

The first example removed all the build scripts and specified compiler flags directly. My example uses PyO3's auto detection mechanism with a hermetic Python toolchain through Bazel.

Also in discussion with the Bazel community, there are some ongoing work in rules_python that may provide necessary information that we can pass to PyO3 as compiler flags https://github.com/bazelbuild/rules_python/issues/824.