Metaxu is a modern systems functional programming language that prioritizes speed, safety, and developer joy. Currently written in Python, it compiles through a TapeVM intermediate representation into optimized C code. Our ultimate goal? To bootstrap Metaxu in itself, creating a language that's so elegant and intuitive that writing its own compiler becomes a delightful challenge.
- ๐ Zero-cost abstractions with unboxed references and move semantics
- ๐ก๏ธ Memory safety through simple modal borrow checking
- โก Powerful algebraic effects system
- ๐งฌ Advanced type system with algebraic subtyping and row polymorphism
- ๐ Pattern matching and compile-time metaprogramming
- ๐งต First-class concurrency with SIMD and multithreading
- ๐ฆ Cross-platform portability
The name "Metaxu" comes from philosopher Simone Weil's concept of divine intermediaries. Just as a wall between prison cells becomes both a barrier and a medium for communication through taps, Metaxu serves as a bridge between high-level abstractions and low-level performance. It connects human intention to machine execution, striving to make systems programming both powerful and accessible.
Deeply inspired by Ante, Hylo, Sage, Oxidized OCaml, Rust, Zig, and Python, we're building a language that embraces both pragmatism and purity. Our goal is to create a tool that helps programmers express their ideas clearly and efficiently, while ensuring their code remains fast and reliable. Furthermore, we want to create a language that's accessible to everyone, regardless of their background or experience level, so that anyone can learn how to build compilers.
- Python 3.11 or higher
- GCC compiler
- uv (Fast Python package installer)
- Install uv:
# On macOS
brew install uv
# On Linux/WSL
curl -LsSf https://astral.sh/uv/install.sh | sh
- Clone the repository:
git clone https://github.com/yourusername/metaxu.git
cd metaxu
- Install dependencies:
# Install all dependencies including dev tools
uv sync --all
# Or install only runtime dependencies
uv sync
- Use Metaxu Compiler:
$ metaxu --help
usage: metaxu [-h] [--target {vm,c}] [--output OUTPUT] [--optimize] [--debug] [--dump-ir] [--dump-ast] [--run] [--link-mode {static,dynamic,library}]
[--library-name LIBRARY_NAME] [--cuda]
files [files ...]
Metaxu compiler
positional arguments:
files Source files to compile
options:
-h, --help show this help message and exit
--target {vm,c} Compilation target (default: vm)
--output, -o OUTPUT Output file
--optimize, -O Enable optimizations
--debug, -g Include debug information
--dump-ir Dump VM IR
--dump-ast Dump AST
--run Run in VM after compilation
--link-mode {static,dynamic,library}
Linking mode (default: static)
--library-name LIBRARY_NAME
Library name (for library builds)
--cuda Enable CUDA support
We have a llm-ctx.txt
file that contains some examples of how to use Metaxu with LLMs. It follows llms.txt standards. Add it via @docs
for IDEs or into relvant context manager protocols.
The project uses doit
as its task runner. Here are the common commands:
# List all available tasks
doit list
# Run all tests (C and Python)
doit test
# Run specific test suites
doit test_python # Run Python tests only
doit test_atomic_effects # Run atomic effects test
doit test_effect_runtime # Run effect runtime test
# Clean build artifacts
doit clean
Test binaries are output to the outputs/
directory.