Transpiler 🚀
An experimental multi-language transpiler framework. Parse source code from one language into a language-agnostic Intermediate Representation (IR), apply semantic passes, and generate source code in your target language.
✨ Features
- Multi-Source Parsing: Support for C, Go, Java, JavaScript, and Rust via tree-sitter, and Python via the standard library
astmodule. - Language-Agnostic IR: An internal representation covering common control flow, structs, arrays, maps, and casts.
- Intelligent Passes: A basic type-inference pass for
Any-typed locals. - Cross-Language Generation: Code generation for all six supported target languages, covering the common subset of each language's control flow and literal syntax.
This project is under active development. It handles core control flow (if/while/for/break/continue), function calls, structs, and casts across all six languages, but does not yet support exceptions, with/context-manager blocks, or non-range iteration in for loops — unsupported constructs raise a clear error at parse time rather than silently producing wrong output. See CLAUDE.md for the current, detailed list of what is and isn't supported.
🛠 Installation
From PyPI
pip install transpiler
From Source
git clone https://github.com/ahron-maslin/transpiler.git
cd transpiler
pip install .
For development (including testing and linting tools):
pip install -e ".[dev]"
🚀 Quick Start
Use the transpiler CLI to convert code instantly:
# Convert a Python script to JavaScript
transpiler example.py --to js
# Convert a C header to Rust
transpiler header.c --to rust
Example
Input (Python):
def fib(n: int) -> int:
if n <= 1: return n
return fib(n - 1) + fib(n - 2)
Command:
transpiler fib.py --to js
Output (JavaScript):
function fib(n) {
if ((n <= 1)) {
return n;
}
return (fib((n - 1)) + fib((n - 2)));
}
🧪 Development
We value code quality and maintainability.
Running Tests
pytest
Linting & Formatting
We use Ruff for linting and Black for formatting.
black src/ tests/
ruff check src/ tests/
Pre-commit Hooks
Ensure your changes meet our standards before committing:
pre-commit install
📦 CI/CD
- CI: Every PR and push to
mastertriggers our GitHub Actions suite, testing on Python 3.10-3.12. - Releases: Automated PyPI publishing on tag creation (e.g.,
git tag v0.1.0 && git push origin v0.1.0).
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for transpiler 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| transpiler-1.0.0.tar.gz | 35.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| transpiler-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.0 kB
Release files / transpiler-1.0.0.tar.gz
| Download URL | transpiler-1.0.0.tar.gz |
|---|---|
| Size | 35.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70c76bafac6abd8065b884f1bb5913c3d24e10fb0cf1d0503109cf9c900dc34a
|
|
BLAKE2b-256 checksum How to use checksums |
9e4659f66d124db3f20989eeffd82c1397689e07d0291d1f7fa48eba39646839
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.
Transparency logRelease files / transpiler-1.0.0-py3-none-any.whl
| Download URL | transpiler-1.0.0-py3-none-any.whl |
|---|---|
| Size | 36.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26b148fe2bd526031197ff8905cd7875cf29b134ab3957e05b5a074910f8919b
|
|
BLAKE2b-256 checksum How to use checksums |
84bd2d7a0526054674470c46429db28879073f852c7cfcddda8da13ff7c36c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.
Transparency logSecurity for transpiler 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for transpiler-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.