Skip to main content

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

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.

Release files for typon 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typon 0.3
File Size Uploaded
typon-0.3.tar.gz 108.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typon 0.3
File Interpreter ABI Platform
typon-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 270.9 kB

Release files / typon-0.3.tar.gz

Download URL typon-0.3.tar.gz
Size 108.6 kB
Tags Source
SHA-256 checksum
How to use checksums
220ef6bc80533767dca789ab03179676b787286d771e2bd0b9c6480c297d5ba5
BLAKE2b-256 checksum
How to use checksums
a9c373eaa2e59b91dccf7c59e98f94a70b4a1d16c27ed39e56e93a63177048e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / typon-0.3-py3-none-any.whl

Download URL typon-0.3-py3-none-any.whl
Size 162.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f1155223d9aefe45d2b36fa2d233c26efe0bea3120c9dded7de200b83f5299e
BLAKE2b-256 checksum
How to use checksums
8f69d87b247c309baa5987c77c2a9a5dfb9fbce3de1c2b87405b203358a2127b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page