Skip to main content

transpilatron

Write Python. Get a native C binary. No C knowledge required.

uvx transpilatron your_code.py

Benchmarks

Benchmark Python C Speedup
Sieve of Eratosthenes (10M numbers) 0.526s 0.022s 24x
Selection sort (10K elements) 1.963s 0.033s 58x

Verified on the same machine. Same output. Fully static binaries.

Benchmarker's PC:

CPU: Ryzen 5 5500

Python 3.14

Zorin OS 18

How it works

transpilatron uses an AI agent to convert your Python project into C, compiles it (using -O2 or -O3 flags), and hands you a native binary. No runtime, no interpreter, no dependencies.

  1. Reads your Python entry file and follows all imports
  2. Transpiles the full project to C
  3. Writes a Makefile and compiles (static for --minimal, dynamic for --full)
  4. Drops the binary in out/

Requirements

Tool Why
uv Run transpilatron instantly with uvx

Note: You only need uv on your host machine. The AI agent automatically detects, installs, and configures all other development and verification dependencies (like C compilers, make, valgrind, and system headers) inside the build environment.

Install

# Run without installing
uvx transpilatron your_code.py

# Or install globally
uv tool install transpilatron

On first run, the tool installs its dependencies and asks you to authenticate with poolside.

Usage

# Default mode (full) — dynamic linking, libcurl, torch/tflite, web frameworks
uvx transpilatron your_code.py

# Minimal mode — fully static, raw sockets, no torch/tflite
uvx transpilatron --minimal your_code.py

The binary lands at out/<your_code>. That's it.

What it handles

  • Pure Python logic → idiomatic C
  • HTTP (requests, urllib3) → raw BSD sockets (--minimal) or libcurl (--full)
  • JSON → cJSON
  • Threading → pthreads
  • File I/O → POSIX syscalls
  • Multi-file projects → one binary
  • Detects and fixes common Python bugs during transpilation
  • Supports many major Python libraries with C extensions by using their C backends or alternatives
  • The system attempts to translate pure Python libraries as well
  • Web frameworks (flask, fastapi, django) → libmicrohttpd (--full only)
  • torch / tensorflow → libtorch / TFLite C API (--full only)

Modes

Mode Default Linking HTTP torch/tensorflow Web Frameworks Best for
minimal Static only Raw BSD sockets Aborts with error Not supported Zero-dependency binaries for initramfs, scratch containers, embedded
full Dynamic permitted libcurl libtorch / TFLite C API libmicrohttpd General use, speed + versatility

Limitations

  • Linux and macOS only
  • torch / tensorflow not supported under minimal mode
  • Some dynamic Python patterns (metaclasses, heavy monkey-patching) may not translate cleanly

Examples

examples/
├── sieve.py      # Prime number sieve — 24x speedup
└── sort.py       # Selection sort — 58x speedup

Comparison

While tools like Nuitka and PyInstaller package the CPython interpreter (and its dynamic standard libraries) to guarantee compatibility, transpilatron completely strips the CPython runtime. By translating Python logic into pure, dependency-free C, it allows you to build single, fully static binaries that run in environments with zero external libraries.

Tool Approach CPython Runtime Dependency? Fully Static Binaries? Output Size Ideal For
transpilatron Source-to-source C translation via LLM No Yes < 1MB CLI tools, microservices, serverless, initramfs, scratch containers, embedded
Nuitka Translates Python to C calling CPython APIs Yes No ~30MB+ Maximum CPython compatibility
PyInstaller Bundles Python interpreter + .pyc files Yes No ~30MB - 100MB+ Desktop app distribution
Cython Compiles Python/Cython to extension modules Yes No N/A Accelerating Python code
PyPy Alternative JIT interpreter Yes No N/A Long-running server workloads

Why uv?

uv is the fastest Python package manager on the planet. uvx lets you run any Python tool instantly without installing it. If you're not using uv yet, you should be.


transpilatron was originally created to compile standalone initramfs boot scripts for Noodlix, a Python-only operating system — but works for many Python applications.

minimal mode outputs fully static binaries. Runs even in initramfs. No dynamic linker required.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transpilatron-8.1.0.tar.gz (260.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transpilatron-8.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file transpilatron-8.1.0.tar.gz.

File metadata

  • Download URL: transpilatron-8.1.0.tar.gz
  • Upload date:
  • Size: 260.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for transpilatron-8.1.0.tar.gz
Algorithm Hash digest
SHA256 783c14f3fd4fdd7c5f33c5f44f8e76797223184033a098521ff554aa847049d1
MD5 61ef83e50a46c81e70745b8137bb0d00
BLAKE2b-256 a39bc9549b4feacadac3dc496fc33a6e37bbfed524d8c2c0a8a289802f768a6a

See more details on using hashes here.

File details

Details for the file transpilatron-8.1.0-py3-none-any.whl.

File metadata

  • Download URL: transpilatron-8.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for transpilatron-8.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6c8800fc1df2e8b9d2d5e32d5aa802b9da9541f3f18d51e4f84ac61f3121139
MD5 1d07e2bee124f7981a8dd2f77a74fdd7
BLAKE2b-256 e8d8e98957df48ce742aef3fcd79c4ac43a4b3e63b2a2d39883b10426932dab4

See more details on using hashes here.

Release history Release notifications | RSS feed

11.0.0

2 files

10.0.0

2 files

9.0.0

2 files

This release

8.1.0 This release

2 files

8.0.0

2 files

7.0.2

2 files

7.0.1

2 files

7.0.0

2 files

6.0.0

2 files

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

4.1.0

2 files

4.0.0

2 files

3.4.1

2 files

3.4.0

2 files

3.3.0

2 files

3.2.0

2 files

3.0.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page