I 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.<p>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.<p>Here's the WASM build of the Rust-including Pydantic-core package for example: <a href="https://pypi.org/project/pydantic_core/#pydantic_core-2.49.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl" rel="nofollow">https://pypi.org/project/pydantic_core/#pydantic_core-2.49.0...</a>
I'm kind of surprised to hear that was a concern because my perception is that PyO3 is more analogous to wrapping native C code in Python libraries (which is pretty well established since long before either Rust or WASM), and Pyodide seems more like something for use in browsers rather on the server-side. When I looked into this earlier this year, trying to run Python via WASM on the server side with Pyodide had a bunch of hoops I needed to jump through, and it ended up being a lot simpler to use a build of Python from one of the core Python contributors that directly targeted WASM.
This is a nice party trick! I use it to provide easy installation of software that is written in rust, but is primarily used by Python users. (e.g.: Biology tools) They can do `pip install <name>`, since some people prefer this over downloading executables/installers. Bonus: Maturin/PyO3 can build "manylinux" binaries automatically, which helps with the Linux ABI diaspora.
> reach for, a Rust extension does the work<p>ai; dr, sorry
it probably is AI written<p>but it's a bit strange<p>It's too "clunky" for AI, like you stumble too much over the words when reading<p>If we take the first sentence that could have been from a German person, where such language structures aren't that uncommon.<p>I myself write a lot like that, and always have written like that, often in way worse ways, like sentences which never, not even after docent of words, end, and have levels of sub-sentence nesting no normal thinking human would want to read. (<- yes that was intentional. I tend to write more concise today.)<p>Through there are indicators of AI usage in pretty much every single sentence.<p>But at the same time the writing is too bad, for most current AI agents.<p>Like reading it is hard, in ways AI tends to not mess up. There are missing filler and glue words. Including some cases where I think they are probably grammatically require (through school was too long ago, so idk.). Sometimes it looks like a different language construct was used (like bracket or -- hyphen inlays) which then where search+replaced with commas.<p>So I really wonder what that is?<p>- a lower quality LLM Model?<p>- AI written text modified by hand leading to it having the worst of both worlds?<p>- or a human who has self learned English as a second language using AI and believes this is how normal English speakers write ...<p>and the last option is kinda frightening, because sooner or later we will have exactly that: People who write like AI "but worse" and likely do not even realize what they are doing.<p>---<p>EDIT/PS: Side note; Rust in Python is a decent match. PyO3 is far from perfect but decently usable. Spreading more awareness about it is nice. This comment is only about the writing structure not the content of the blog post.
But 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?
How much of the existing PyPI ecosystem do you think could realistically work this way without package authors doing anything specifically for WASM?
They’re not running Rust they’re running machine code compiled with the Rust compiler. Like many other Python libraries such as numpy are running machine code compiled with C++, C or Fortran. That was always the case for Python and is its main selling point, it’s a slow but easy to write glue language that can make faster native code scriptable.<p>Also the article reeks of AI slop, it’s just trying to sell you a Rust course.
It’s time to start figuring out how to block domains on hacker news. This slop is getting out of control. Who can read this? The first few sentences already induced a migraine.
Why not just run C inside of Python?
For the same reasons someone might prefer Rust to C in general; safety, ergonomics, etc. If you want to write C in Python, nothing is stopping you.
You can do that too. I generally prefer rust as it's a nice lang to work with.
Because you want to use other existing libraries that are written in Rust.