Python iconPythonSep 30, 2026 ~3 min source read

Spicycrab: a Python-to-Rust transpiler demonstrated at Python Language Summit 2026

Kushal Das presented Spicycrab, a tool that transpiles Python into Rust so Python developers can get Rust-level performance without learning Rust. He demonstrated compiling a Python script to Rust and an async web server using actix-web.

Python Insider: Spicycrab (Python Language Summit 2026)

Share this story

Send the public story page.

Useful takeaways from this story.

Spicycrab transpiles Python source to Rust source, producing a Rust project (example: greet/src/main.rs) that can be built with Cargo.

The tool targets Python users who hit single-machine performance limits and want Rust performance without learning Rust syntax.

Trade-offs include heavy Rust dependency compilation (demo pulled ~180 crates) and questions about long-term maintenance of transpiled code.

# What Spicycrab is

# How the demo worked

Kushal demonstrated a simple command-line transpile: crabpy transpile greet.py -o greet. That produced Rust source at greet/src/main.rs, which can then be run with cargo run. The demo also included an async web server case using actix-web. Kushal used generated Python stubs that mirror the actix-web API, wrote Python code with async functions and type annotations, transpiled that to idiomatic Rust, installed dependencies via Cargo, and compiled a binary that served HTTP responses.

# Who this is for

Kushal framed Spicycrab for teams constrained by a single virtual machine or limited resources where horizontal scaling isn't an option. Historically, such teams resorted to writing C extensions for hot paths, which brought complexity, crashes, and security concerns. Rust removes many of those safety concerns, but Rust's syntax can be a barrier. Spicycrab is aimed at developers who want the performance and safety improvements Rust offers without leaving Python.

  • Spicycrab works by providing generated stubs for Rust libraries so Python code written to those stubs can be transpiled into equivalent Rust code that uses the real Rust libraries (actix-web in the demo).

# Comparison to other approaches

# Maintenance and cost considerations

# What to watch next

Spicycrab demonstrates a path for Python-first teams to leverage Rust performance while staying in Python's syntax for development. The demo highlights practical barriers—dependency compilation and long-term maintenance—that teams should weigh when considering this approach.

More context around this story.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app