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:
typon-concurrency
, a C++ concurrency runtime- typon-compiler (this repository), a compiler from Python syntax into C++
Getting started
Install
From code
git clone https://lab.nexedi.com/typon/typon-compiler.git --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
TODO.
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 test_runner.py
.
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
typon-0.3-py3-none-any.whl
(162.3 kB
view hashes)