Live data from Hacker News

Calling Rust from Python using PyO3

saidvandeklundert.net

1–10 of 51 posts

Re: Calling Rust from Python using PyO3

#4
https://pypi.org/project/blake3 has been based on PyO3 for about a year and a half now, and it's been smooth sailing. One of the reasons we reach for compiled code from Python is to get multithreading working for CPU-bound tasks, and the combination of PyO3 plus Rayon on the Rust side is especially nice.

Re: Calling Rust from Python using PyO3

#10
post #2

I hope someone creates a rule set for Bazel to automate this stuff. This seems like a really nice way to start rewriting performance critical code in a safe language!

I’ve been having difficulty recently trying to get bazel and rust to work together nicely.

It seems like cargo does a lot of heavy lifting w.r.t. dependencies which Bazel does not like. Do you have to vendor your dependencies- and your dependencies dependencies. Ad infinitum.

There is cargo-raze which helps, but only if you’re making a rust library: not if you’re making a binary.

So maybe it works for this case.

Post reply on HN