frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Rextio – Compile Python code natively using Rust with CPython fallbacks

https://github.com/rextio/rextio
1•rextio•1h ago
Hi, HN! Let me introduce my experimental project Rextio.

While Python is widely used in fields such as AI and data analysis and offers the advantage of fast coding, it often causes some performance issues because Python is an interpreter language.

Of course, there are various alternatives to address Python's speed issues. In some cases, Python code is used only for initial prototypes, and the development is re-evaluated in Rust or C/C++ upon transitioning to production.

However, I'm experimentally developing this tool called Rextio as a new alternative to solve speed problems without abandoning Python.

Rextio improves performance by automatically converting parts of Python hot paths that can be compiled natively (such as type-hinted static code) into Rust code and compiling them into binaries. It then falls back to the rest of the code as is and executes it using CPython. This allows for the complete preservation of the original Python logic while aiming to improve execution speed for specific parts.

Roughly speaking, it is as follows:

``` typed Python project

-> analyze supported native candidates

-> reject unsafe or unsupported functions

-> generate Rust + PyO3 for accepted functions

-> generate Python fallback wrappers for the rest

-> build import-compatible artifacts ```

Please refer to the documentations in the Git repository for details.

Performance improvements are also confirmed when comparing execution with the native binary converted to Rextio versus execution with the original Python code only using CPython.

* When running basic Python code converted to native: 57.73×

* When running NumPy converted to native: 2.52×

* When running NetworkX' Dijkstra algorithm converted to native: 3.68×

* When running `pandas`' `Series.map` converted to native: 66.14×

* When running PyTorch deep MLP converted to native: 1.02× (Speed improvement limited due to using C extensions in existing Python packages)

* When running TensorFlow eager chain converted to native: 1.04× (Speed improvement limited due to using C extensions in existing Python packages)

Please refer to the [`rextio-benchmark` Git repository](https://github.com/rextio/rextio-benchmark) for the source code and execution environment information used in the benchmarks that yielded the above results.

Rextio has a Core CLI that converts and compiles Python code, and we are developing additional plugins that define rules for converting individual Python packages into Rust code to be attached to it. We have currently developed some plugins for NumPy and others (`rextio-numpy`, `rextio-networkx`, `rextio-pandas`, `rextio-torch`, `rextio-tensorflow`, etc.), and the benchmark results above were obtained using these plugins.

Rextio is still an early-stage project with much room for improvement, and compiling Python code into Rust-based native code does not guarantee performance gains in all situations.

For instance, if there is frequent data exchange between natively compiled parts and CPython fallbacks, data conversions crossing the boundaries can actually lead to a decrease in speed. However, in such cases, Rextio tries to fall back the entire process to CPython without passing through native code to prevent this degradation.

If you have any questions or feedback, I'll do my best to answer them and incorporate them into feature improvements.

Thank you.

Show HN: NixOS-DGX-Spark – Nix and NixOS on the DGX Spark

https://github.com/graham33/nixos-dgx-spark
1•graham33•56s ago•0 comments

Yahoo Finance rate-limits you harder if you spoof a browser User-Agent

https://github.com/AdityaSBisht/finance-mcp
1•adityabisht2700•3m ago•0 comments

Feedback wanted: Reflex – A low-cost retrieval API for recurring documents

https://aivax.net/blog/reflex-retrieval-built-for-recurring-documents/
1•cypherpotato•3m ago•0 comments

Poles of Inaccessibility in the San Gabriel Mountains

https://notes.secretsauce.net/notes/2015/05/06_poles-of-inaccessibility-in-the-san-gabriel-mounta...
1•dima55•3m ago•0 comments

How fast is C++26's std:hive?

https://lemire.me/blog/2026/08/02/how-fast-is-c26s-stdhive/
1•usdogu•3m ago•0 comments

Pushes to arch AUR are suspendended right now.

https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/message/YPJ3FQYJTJXXY3R...
1•EbNar•3m ago•0 comments

Best Office Chairs of 2026– We Tested 70 to Pick Them

https://www.wired.com/gallery/best-office-chairs-button-1/
1•joozio•5m ago•0 comments

Prevent cognitive debt by manually retyping LLM-generated code

https://ankursethi.com/blog/prevent-cognitive-debt-by-manually-retyping-llm-generated-code/
1•philipportner•6m ago•0 comments

Epipe on write might mean you're doing it wrong

https://rachelbythebay.com/w/2026/07/09/pipe/
1•mpweiher•6m ago•0 comments

Understanding VC signals part I

https://www.admnt.com/blog/understanding-vc-signals-part-1
1•kekqqq•7m ago•0 comments

GNU Hurd News 2026-Q2

https://www.gnu.org/software/hurd/news/2026-q2.html
2•plaguna•9m ago•0 comments

The Secret Thrill of Paying to Open Someone Else's Unwanted Package

https://www.bloomberg.com/news/features/2026-07-31/why-amsterdam-s-mystery-parcel-shops-are-sprea...
2•p1anecrazy•9m ago•1 comments

NASA's Curiosity rover finds a field of honeycomb-textured ground on Mars

https://www.nasa.gov/missions/mars-science-laboratory/curiosity-rover/nasas-curiosity-mars-rover-...
4•MarcoDewey•11m ago•1 comments

Put a Tag on It

https://tedium.co/2026/08/01/pricing-guns-vs-barcodes-history/
1•Brajeshwar•12m ago•0 comments

Pepper-spraying drones deploying against school shooters, not everyone approves

https://theweek.com/crime/pepper-spraying-drones-school-shooters
1•mdp2021•14m ago•2 comments

Anyone used Agent Reach yet? any good?

https://github.com/Panniantong/Agent-Reach/blob/main/docs/README_en.md
1•artur_makly•15m ago•0 comments

Linux Desktop Market Share Surpasses 10% in North America

https://linuxiac.com/linux-desktop-market-share-surpasses-10-in-north-america/
2•leephillips•16m ago•0 comments

Show HN: Schmess – chess with no turns; pieces freeze on cooldown after moving

https://schmess.com/
1•navalsaini•19m ago•0 comments

Building Progressively Enhanced Forms Using Htmx

https://www.rafa.ee/articles/progressive-enhanced-forms-htmx/
1•mpweiher•21m ago•0 comments

Political Parties as Drivers of U.S. Polarization: 1927-2018

https://www.journals.uchicago.edu/doi/abs/10.1086/743333
1•paulpauper•22m ago•0 comments

The Rise of Million-Dollar Companies with Just One Employee

https://www.wsj.com/tech/ai/the-rise-of-million-dollar-companies-with-just-one-employee-f36a77c1
4•paulpauper•22m ago•1 comments

Inverting the seminar to recover what scientific papers leave out

https://www.eurekalert.org/news-releases/1138136
1•paulpauper•22m ago•0 comments

GE-97 Terminal: The Old Internet

https://ge97.com/
2•classichasclass•25m ago•0 comments

Build Kimi K3 from Scratch

https://kimik3.grok.me/
3•rawqubit•32m ago•0 comments

Graduate in 2036 as a AI engineer is it worth?

1•eapyk•34m ago•3 comments

Letter to Hacker News (With Love)

https://geometryentropynewmaterials.substack.com/p/an-open-letter-with-love-to-hacker
1•MaybeGoodRoyal•35m ago•0 comments

Show HN: TFStudio – open-source design and optimization for optical thin films

https://github.com/aai2k/TFStudio
1•aai2k•39m ago•0 comments

Show HN: Kakehashi – Experimental userspace to run macOS binaries on Linux ARM

https://github.com/wie-project/kakehashi
12•vlad_kalinkin•40m ago•3 comments

Show HN: Sprocket – The Best AI Agent for Hardware and Software Development

https://sprocket-demo.spikonado.com
17•amronos•40m ago•1 comments

Catastrophic MoD data breach happened because stuff didn't know how to use excel

https://www.independent.co.uk/news/uk/home-news/afghan-data-breach-superinjunction-defence-report...
3•Teever•40m ago•0 comments