frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Libraries Run Rust Inside Python (With PyO3)

https://belderbos.dev/blog/how-libraries-run-rust-inside-python/
14•lumpa•1h ago

Comments

the__alchemist•40m ago
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.
simonw•34m ago
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.

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://pypi.org/project/pydantic_core/#pydantic_core-2.49.0...

saghm•16m ago
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.
roywiggins•30m ago
> reach for, a Rust extension does the work

ai; dr, sorry

skeledrew•19m ago
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?
the__alchemist•10m ago
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)
hk1337•18m ago
Why not just run C inside of Python?
saghm•15m ago
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.
the__alchemist•11m ago
You can do that too. I generally prefer rust as it's a nice lang to work with.

Astra and Fable still hack on simple variants of alignment evals from 2025

https://www.lesswrong.com/posts/munJKF7iWMsWJLAH2/astra-and-fable-still-hack-on-simple-variants-o...
109•Levitating•1h ago•29 comments

JetKVM Mini

https://jetkvm.com/blog/introducing-jetkvm-mini
361•taubek•8h ago•140 comments

Libraries Run Rust Inside Python (With PyO3)

https://belderbos.dev/blog/how-libraries-run-rust-inside-python/
15•lumpa•1h ago•10 comments

'Fingerprints' inside the Sun could reveal if it once swallowed a planet

https://ras.ac.uk/news-and-press/research-highlights/fingerprints-inside-sun-could-reveal-if-it-o...
71•blincoln•4h ago•20 comments

Why is the x86 undefined instruction called ud2? Why 2?

https://devblogs.microsoft.com/oldnewthing/20260910-00/?p=112689
49•ibobev•3h ago•13 comments

CUDA for AMD on Windows

https://github.com/Speedstu/CUDA-for-AMD-Windows
29•chiassedu80•2h ago•2 comments

Reverse engineering my e-scooter and rewriting the firmware in Rust

https://bensimms.moe/reverse-engineering-scooter/
138•vinhnx•3d ago•41 comments

Why are AI agents lying, cheating and coordinating?

https://yoshuabengio.org/en/publication/why-are-ai-agents-lying-cheating-and-coordinating
459•jonifico•15h ago•532 comments

TailTalk: A modern async user space AppleTalk stack with Rust and Tokio

https://github.com/FeralFirmware/TailTalk/
45•zdw•16h ago•11 comments

Cpak – OCI application package format for Linux desktops, servers and devices

https://cpak.it/
7•xlmnxp•1h ago•1 comments

Making Startups Powerful

https://paulgraham.com/powerful.html
15•tosh•2h ago•7 comments

Homebrew 7.0.0

https://brew.sh/2026/09/13/homebrew-7.0.0/
368•mikemcquaid•7h ago•145 comments

Alan's Random Insult Generator (1999)

https://alanbellows.com/experiments/insult/index.html
10•DamnInteresting•2d ago•4 comments

Predictive intelligence to anticipate anything.

https://prior.chat/
7•onemarkos•1h ago•8 comments

Aligned to whom?

https://hyperbo.la/w/aligned-to-whom/
139•lopopolo•13h ago•81 comments

Make your first edit to OpenStreetMap

https://high5apps.github.io/josm-plugin-website-wizard/
546•juliantigler•1d ago•134 comments

Key symbols we lost to time, pt. 1: The PC side

https://unsung.aresluna.org/key-symbols-we-lost-to-time-pt-1-the-pc-side/
34•leephillips•2h ago•8 comments

On Binary Translation and Its Consequences

https://chipsandcheese.com/p/on-binary-translation-and-its-consequences
27•matt_d•2d ago•10 comments

Base84 deserves a place in file names

https://00f.net/2026/09/09/base84/
31•kevvok•2d ago•16 comments

The Interim Computer Museum

https://icm.museum/
148•mulmen•13h ago•17 comments

US Customs supervisor busted for stealing hardware from Homeland Security PCs

https://www.tomshardware.com/pc-components/us-customs-supervisor-busted-for-stealing-core-i7-cpus...
82•Levitating•3h ago•63 comments

Garry Tan wants US open-weight AI labs to 'distill' frontier models, too

https://techcrunch.com/2026/09/11/y-combinators-garry-tan-wants-u-s-open-weight-ai-labs-to-distil...
13•TheJCDenton•43m ago•3 comments

Revolut confirms customer data breach through fake government requests

https://techcrunch.com/2026/09/12/revolut-confirms-customer-data-breach-through-fake-government-r...
135•tdrz•6h ago•88 comments

Ode to Metadata

https://www.autodidacts.io/ode-to-metadata/
12•surprisetalk•3d ago•1 comments

I Added a Non-Wi-Fi Mitsubishi AC to Home Assistant

https://medium.com/@ivangomezarnedo/how-i-added-a-non-wi-fi-mitsubishi-ac-to-home-assistant-22770...
136•ichacas•3d ago•67 comments

Apple iPod Engraver (2019)

https://dunstanorchard.com/apple-ipod-engraver/
264•NaOH•4d ago•69 comments

Don't be the out of touch Kung Fu master

https://twitter.com/ID_AA_Carmack/status/2098443262214230095
212•dsubburam•18h ago•291 comments

Paul A. M. Dirac, Interview by Friedrich Hund (1982) [video]

https://www.youtube.com/watch?v=xJzrU38pGWc
24•emerongi•2h ago•2 comments

Nvidia is the central bank of AI

https://www.economist.com/interactive/briefing/2026/09/03/nvidia-is-the-central-bank-of-ai
534•tolugenius•1d ago•382 comments

Stabilizing Rust's Never Type

https://lwn.net/SubscriberLink/1091015/d9e48318ed242b41/
231•cjd8•4d ago•89 comments