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 details)
Built Distribution
typon-0.3-py3-none-any.whl
(162.3 kB
view details)
File details
Details for the file typon-0.3.tar.gz
.
File metadata
- Download URL: typon-0.3.tar.gz
- Upload date:
- Size: 108.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220ef6bc80533767dca789ab03179676b787286d771e2bd0b9c6480c297d5ba5 |
|
MD5 | e070b5af658215ae779f02dc6c49a06f |
|
BLAKE2b-256 | a9c373eaa2e59b91dccf7c59e98f94a70b4a1d16c27ed39e56e93a63177048e8 |
File details
Details for the file typon-0.3-py3-none-any.whl
.
File metadata
- Download URL: typon-0.3-py3-none-any.whl
- Upload date:
- Size: 162.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1155223d9aefe45d2b36fa2d233c26efe0bea3120c9dded7de200b83f5299e |
|
MD5 | 15d0d0c578564aa86cf9d40a6b478e8a |
|
BLAKE2b-256 | 8f69d87b247c309baa5987c77c2a9a5dfb9fbce3de1c2b87405b203358a2127b |