Skip to main content

A Python-to-C++ compiler geared towards concurrency

Project description

Typon compiler

Typon is a two-part project to bring practical GIL-free concurrency to Python:

  1. typon-concurrency, a C++ concurrency runtime
  2. typon-compiler (this repository), a compiler from Python syntax into C++

Getting started


From code

git clone --recursive
python3 -m venv typenv
source typenv/bin/activate
pip install ./typon-compiler

From PyPI

pip install typon

Install dependencies

apt install g++-13 libfmt-dev liburing-dev python3.12-dev libssl-dev

Basic usage

Typon can be used from the command-line to compile a Python file:

typon [-o/--output output] [-d/--debug] [-v/--verbose] input

Once generated, the C++ code file can be compiled using your compiler of choice:

$(CXX) -O3 $(typon --cpp-flags) input.cpp

Currently, you'll get the best support with G++ 13.

Directory structure

docs, documentation

Currently using Sphinx.

include, standard library and compiler primitives/intrinsics


runtime, concurrency runtime (Git submodule)

See the runtime repository.

trans, transpiler

This repository, TODO.

Test harness

cd into the trans directory, set up your .env file (you can copy the .env.example file), and run python3

Project details

Download files

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

Source Distribution

typon-0.3.tar.gz (108.6 kB view hashes)

Uploaded Source

Built Distribution

typon-0.3-py3-none-any.whl (162.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page