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
2•rextio•4h 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: Kakehashi – Experimental userspace to run macOS binaries on Linux ARM

https://github.com/wie-project/kakehashi
107•vlad_kalinkin•4h ago•26 comments

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

https://github.com/graham33/nixos-dgx-spark
56•graham33•3h ago•13 comments

Show HN: Bor – Open-source policy management for Linux desktops

https://getbor.dev/blog/2026-08-02-bor-v080-release/
152•eniac111•11h ago•19 comments

Show HN: Fuse – statically typed functional programming language

https://fuselang.org
87•the_unproven•9h ago•23 comments

Show HN: I'm a 15 Year Old Wannabe Engineer, This Is a Cycloidal Gearbox I Built

https://github.com/tom-ilan/cycloidal_gearbox
304•tomilan•18h ago•98 comments

Show HN: My public second brain – 660 notes, 15 years, open source

https://www.ssp.sh/brain/
2•zazuke•47m ago•5 comments

Show HN: Syncular – offline-first SQL sync with TypeScript and Rust cores

https://github.com/syncular/syncular
71•quambo•10h ago•24 comments

Show HN: Katharos Functional programming and CSP-style concurrency for Python

https://github.com/kamalfarahani/katharos
29•kamalf•9h ago•8 comments

Show HN: I added a client-side SQL sanitizer so schema never touches our servers

https://www.querytuner.com/
2•autoshiftops•3h ago•0 comments

Show HN: MCP Emails – An MCP Server for Gmail and IMAP/SMTP Inboxes

https://github.com/Albretsen/MCPEmails/tree/main/self-host
2•asgeiralbretsen•3h ago•0 comments

Show HN: Elevators

https://john.fun/elevators
1618•Jrh0203•2d ago•397 comments

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

https://schmess.com/
2•navalsaini•3h ago•3 comments

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

https://github.com/rextio/rextio
2•rextio•4h ago•0 comments

Show HN: I worked on a new browser for 2 years, today it passed Acid 3

https://code.intellios.ai/cwbrowser/
148•coolwulf•1d ago•43 comments

Show HN: Logan Basic v2.1 - An online BASIC interpreter.

https://sinusoft.com/loganbasic/
22•Sinusoid314•2d ago•3 comments

Show HN: TamedTable, AI ETL in Natural Language

https://www.tamedtable.com/
8•ZeljkoS•12h ago•4 comments

Show HN: What should the GUI for AI agents look like?

https://marbleos.com/demo
134•akbabu•2d ago•78 comments

Show HN: Btfy – a blockchain that uses weather observations

https://github.com/kotagit75/btfy
10•yuzu_mikan•13h ago•5 comments

Show HN: Aevros .... A kernel that explains itself

https://github.com/Mobeen0119/Aevros
4•Mobeen0119•12h ago•1 comments

Show HN: Gander, an Android file viewer that asks for no permissions

https://github.com/mokshablr/gander
207•mokshablr•2d ago•74 comments

Show HN: Stripe for Wearable Data

https://stridee.fit/developer
2•alvaromolina0•8h ago•1 comments

Show HN: Kedge – Full-stack cloud with forkable VM snapshots and global SQLite

https://kedge.dev/
137•wgjordan•4d ago•25 comments

Show HN: CaLLMar – play a text-based adventure game in an LLM chat

https://github.com/lascauje/callmar
3•lascauje•9h ago•0 comments

Show HN: Documan – AI Powered Requirement Management Workspace

https://github.com/bbayer/DocuMan
3•bbayer•9h ago•1 comments

Show HN: Distilling DeepSeek into GPT-OSS doesn't transfer censorship. Try it

https://www.ctgt.ai/research/distillation-censorship-transfer
166•cgorlla•3d ago•73 comments

Show HN: Legionlinuxtui – Control Lenovo legion laptops in the terminal

https://github.com/nooneknowspeter/legionlinuxtui
16•nooneknowspeter•3d ago•0 comments

Show HN: We made Arcad, a parametric CAD in the browser, free and no signup

https://app.arcad.studio/
5•steinvakt2•10h ago•2 comments

Show HN: BitBang – Reach machines behind NAT from a browser, no account

https://github.com/richlegrand/bitbang-cli
94•narragansett•2d ago•38 comments

SHOW HN: Substantial update to UK train mapping

https://trainmap.co.uk/map.html
4•optionalltd•10h ago•0 comments

Show HN: 8bit/cnlibs – 8bit Shadcn component library

https://8bit.cnlibs.com/
2•samke-•10h ago•0 comments