Compiled · Statically Typed · Python Syntax · C Performance
Documentation · Examples · Releases · Issues
Tauraro is a compiled, statically-typed language with Python-style indentation syntax — Python's readability with performance close to hand-written C.
It ships as a batteries-included, cross-platform toolchain: one download compiles for your machine and cross-compiles to Linux/Windows/macOS, ARM/RISC-V, WebAssembly, and bare-metal firmware — with nothing else to install. Two code generators back it: the default C backend (widest coverage, gcc/clang) and an optimizing LLVM backend (auto-vectorizing, often faster than C). A bundled zig provides clang + lld + a libc for every target, so --backend llvm and --target <anything> work straight out of the box. See Compiling, Backends & Cross-Compilation.
def greet(name: str) -> str:
return f"Hello, {name}!"
def main():
print(greet("world"))Download the latest binary from the Releases page:
| Platform | File |
|---|---|
| Windows (x64) | tauraroc-windows-x64.zip |
| Linux (x64) | tauraroc-linux-x64.tar.gz |
| macOS (x64/arm64) | tauraroc-macos.tar.gz |
Extract and place tauraroc (or tauraroc.exe on Windows) somewhere on your PATH.
No prerequisites. The release SDK bundles a full toolchain (a zig/ folder beside the
binary = clang + lld + a libc for every target), auto-detected at runtime — so
--backend llvm and cross-compilation work with nothing else installed. A system
gcc/clang, if present, is preferred for faster host builds but isn't required.
Verify your installation:
tauraroc --version
# tauraroc v0.0.8hello.tr
def main():
print("Hello, world!")tauraroc --run hello.tr| Feature | Description |
|---|---|
| Classes | Method dispatch, inheritance (extends), interfaces, operator overloading |
| Enums | Tagged unions with pattern matching |
| Generics | Monomorphized at compile time — no boxing |
| F-strings | f"result = {value}" — zero overhead |
| Ownership | Automatic memory management, no GC |
| Error handling | Result[T,E], throws, ? operator |
| Concurrency | spawn, task_group:, await_all, Thread.spawn, Chan[T], Mutex[T], Atomic[T] |
| Data race safety | Sendable interface enforced at compile time on all spawn/thread boundaries |
| Unsafe | unsafe:, Pointer[T], inline asm() |
| GPU | gpu: blocks → OpenMP parallel loops |
| FFI | extern "C" for calling C libraries |
| Closures | First-class anonymous functions with capture |
tauraroc <file.tr> [options]
tauraroc fmt [-w] <file.tr> Format source (stdout, or -w in place)
tauraroc lint <file.tr> Analyze and report warnings/errors
--version Print compiler version and exit
--run Compile and immediately execute
--check Semantic analysis only, no output
--backend c|llvm|native Code generator (default: c)
--target <name|triple> Cross-compile: linux-arm64, windows-x64, macos-arm64,
android-*, ios, wasm-wasi, embedded-arm/riscv*, … or a raw triple
--static Statically link (musl on Linux)
--sysroot <path> Override the cross toolchain's sysroot
-o <path> Exact output path (dir honored; overrides -d)
-d <dir> Output directory (default: current dir)
--lib Build a shared library (.so/.dll) + a C header
--emit c|ast|mir Emit generated C / AST / MIR and stop
--emit-ld <path> Also write a linker script (bare-metal @entry)
-O0/-O1/-O2/-O3 Optimization level (default: -O2)
-Os Optimize for size
--debug AddressSanitizer + bounds-check assertions
--strict Alloc/dealloc outside `unsafe:` is an error [U-1]
--no-heap Reject all heap-allocating constructs [H-1]
--no-std `alloc` tier — pluggable allocator, no OS services
--freestanding `core` tier — no OS, no libc (bare metal)
--link <path> Link a file (.c/.o/.a/.dll/.so)
-l<name> Link a library by name (e.g. -luser32)
--verbose Show all pipeline phases
Full details, the target matrix, static binaries, WebAssembly, and bare-metal: Compiling, Backends & Cross-Compilation.
class Counter:
pub total: i64
extend Counter:
pub def init(n: i64) -> Counter:
mut c = Counter()
c.total = n
return c
pub def add(self, n: i64) -> void:
self.total = self.total + n
pub def show(self) -> void:
print(f"total = {self.total}")
def main():
mut c = Counter.init(0)
for i in range(10):
c.add(i)
c.show() # total = 45.tr source
│
▼
Lexer tokenize source text
│
▼
Parser build AST
│
▼
Sema type-check, resolve names
│
▼
HIR typed intermediate representation
│
├─────────────┬───────────────────┐
▼ ▼ ▼
C Codegen LLVM Codegen (native x86-64, WIP)
│ │
▼ ▼
gcc/clang/ clang/llc/ ← bundled zig provides all of these +
zig cc zig cc a libc for every --target
│ │
└──────┬──────┘
▼
Executable / .wasm / bare-metal firmware
All stages are written in Tauraro itself — the compiler is fully self-hosted (the LLVM backend compiles the whole compiler and emits byte-identical C to the reference C build).
Benchmarks run on Linux x86_64 with gcc -O3 (C), rustc -C opt-level=3 -C target-cpu=native (Rust), and tauraroc -O3 (Tauraro → C → gcc -O3 -march=native -funroll-loops). Wall-clock seconds, lower is better.
| Benchmark | C (s) | Rust (s) | Tauraro (s) | Tau/C | Tau/Rust |
|---|---|---|---|---|---|
| Fibonacci 1B | 0.313 | 0.311 | 0.311 | 0.99× | 1.00× |
| Float Multiply 1B | 0.933 | 0.934 | 0.934 | 1.00× | 1.00× |
| XOR Shift PRNG 1B | 1.866 | 1.867 | 1.870 | 1.00× | 1.00× |
| Newton Sqrt 1B | 6.063 | 6.046 | 6.053 | 1.00× | 1.00× |
| Mandelbrot 800×800 | 0.442 | 0.441 | 0.428 | 0.97× | 0.97× |
| N-Body 10M | 0.286 | 0.284 | 0.289 | 1.01× | 1.02× |
| Sieve 50M | 0.172 | 0.182 | 0.265 | 1.54× | 1.46× |
| Matrix Multiply 400×400 | 0.015 | 0.012 | 0.033 | 2.20× | 2.75× |
Tauraro runs at C/Rust parity on the scalar compute kernels (within ~3%), and stays leaner than Rust on memory across the board. Sieve and MatMul are still slower (cache/aliasing-bound). Full results, including peak memory, in benchmarks/README.md.
The full language reference lives in docs/lang/:
| # | Topic |
|---|---|
| 01 | Introduction & CLI |
| 02 | Variables & Types |
| 03 | Operators |
| 04 | Control Flow |
| 05 | Functions & Closures |
| 06 | Strings & F-Strings |
| 07 | Collections |
| 08 | Classes & Extend |
| 09 | Enums |
| 10 | Interfaces |
| 11 | Generics |
| 12 | Error Handling |
| 13 | Memory & Ownership |
| 14 | Unsafe & Pointers |
| 15 | Modules |
| 16 | Concurrency |
| 17 | Extern & FFI |
| 18 | GPU & Inline Assembly |
| 19 | Compiler Error Reference |
| 20 | Advanced Patterns |
| 21 | Operator Overloading |
Tauraro is dual-licensed under your choice of:
- MIT License — see
LICENSE-MIT - Apache License, Version 2.0 — see
LICENSE-APACHE
You may use, distribute, and modify Tauraro under the terms of either license.
Built with ❤️ — Python syntax · C performance