Live data from Hacker News

Libraries Run Rust Inside Python (With PyO3)

belderbos.dev

31–40 of 41 posts

Re: Libraries Run Rust Inside Python (With PyO3)

#31

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?

It won't work in those cases. Do you have explicit examples? I suspect this won't come up much as Rust has, IME, much broader target support. (Including platforms without a GPOS)

I'm using Flet for a major project, which includes iroh, and it's been hellish going because the only way was to use the Kotlin build for mobile support, where I've had to be patching things all over to get something reasonable. Burned a lot of time on it and it still occasionally breaks, while the Python parts have been generally solid. Initially I looked into converting the Rust to Python, but that's a non-starter because of the semantics.

-flet.dev

Re: Libraries Run Rust Inside Python (With PyO3)

#32

Earlier quoted context omitted.

How’s that GCC backend coming along? I could look it up, but I bet others would like to hear about it too.

https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-43 They’re plugging away at it. A major milestone was getting unwinding to work. I’d say they’re getting quite close and it’s getting better and better. It’s usable for Linux kernel compilation I believe which unlocks Rust to be used for the non-driver components in the kernel.

This is so cool. That's going to be amazing when it lands.

Re: Libraries Run Rust Inside Python (With PyO3)

#34

Earlier quoted context omitted.

https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-43 They’re plugging away at it. A major milestone was getting unwinding to work. I’d say they’re getting quite close and it’s getting better and better. It’s usable for Linux kernel compilation I believe which unlocks Rust to be used for the non-driver components in the kernel.

This is so cool. That's going to be amazing when it lands.

It’s already in rustup for what it’s worth. Not sure what “when it lands” means but I’m sure it’s an ever moving goalpost.

Re: Libraries Run Rust Inside Python (With PyO3)

#35
post #30

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?

Python doesn't even work everywhere Python works. I am really starting to like and lean towards languages that compile to a binary instead of scripting languages like Python, Ruby, PHP. It's nice that, as long as it's compiled for the correct architecture, I don't have to install the language to run the application.

I got to love scripting languages with at very least a proper JIT compiler, since the work a Portuguese startup, where we did too much "rewrite Tcl in C" kind of work.

Indeed we ended up weighting between rewriting the whole thing in something else, with .NET being the winner, as Microsoft partners we got early access to ongoing .NET builds, for those that would like to present their "rewritten in .NET" products alongside the .NET public announcement in 2001.

Since then for me, the role of scripting languages like Python, Ruby has always been to be better than what I would use Bash for, PHP is what my ISP has, and that is about it.

Re: Libraries Run Rust Inside Python (With PyO3)

#36
post #20

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.

We can't cheer about using Claude for coding, and then complain they use to write blog posts as well.

This attitude is what gets me a migraine.

Re: Libraries Run Rust Inside Python (With PyO3)

#38
post #37
post #12

Earlier quoted context omitted.

yeah, Rust is eating C/C++...

While using a compiler framework written in C++, yeah.

I'm with you on the broader sentiment that Rust isn't making nearly as many inroads many people think.

But this example is silly. Do we say "FORTRAN is eating R" because R uses BLAS/LAPACK/whatever via gfortran? Nah. A zillion languages use LLVM.

Re: Libraries Run Rust Inside Python (With PyO3)

#39
post #36
post #20

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.

We can't cheer about using Claude for coding, and then complain they use to write blog posts as well. This attitude is what gets me a migraine.

For me, it's simply that I have to read Claudese instrumentally for work enough that I am not going to spend my neurons reading it idly. I am not mad about it or anything, it just sucks to open up a blog post and realize that it's just Claude again under a different name.
Post reply on HN