Libraries Run Rust Inside Python (With PyO3)
belderbos.dev
Libraries Run Rust Inside Python (With PyO3)
1–10 of 41 posts
Re: Libraries Run Rust Inside Python (With PyO3)
#2Re: Libraries Run Rust Inside Python (With PyO3)
#3Thankfully that's now been mostly solved - you can compile and publish WASM builds of Rust or C extensions on PyPI now and a Pyodide can then use them.
Here's the WASM build of the Rust-including Pydantic-core package for example: https://pypi.org/project/pydantic_core/#pydantic_core-2.49.0...
Re: Libraries Run Rust Inside Python (With PyO3)
#4ai; dr, sorry
Re: Libraries Run Rust Inside Python (With PyO3)
#5Re: Libraries Run Rust Inside Python (With PyO3)
#6Re: Libraries Run Rust Inside Python (With PyO3)
#7I was a bit nervous about this trend when it started picking up because I care about Pyodide (Python running via WebAssembly) and libraries that use PyO3 might not work in Pyodide. Thankfully that's now been mostly solved - you can compile and publish WASM builds of Rust or C extensions on PyPI now and a Pyodide can then use them. Here's the WASM build of the Rust-including Pydantic-core package for example: https://…
Re: Libraries Run Rust Inside Python (With PyO3)
#8Why not just run C inside of Python?
Re: Libraries Run Rust Inside Python (With PyO3)
#9Why not just run C inside of Python?
Re: Libraries Run Rust Inside Python (With PyO3)
#10But does it work everywhere Python works? My main issue with this Rust move has always been compatibility. Python can be embedded and ran in a heck of a lot of places. What's the story when libraries that I may want to depend on are actually implemented in Rust and my target doesn't/can't handle the toolchain and there's no build target?