Zamin Docs

Zamin

A fast, readable programming language

Zamin combines Python-like syntax with a lightweight bytecode VM. It matches Python on integer-heavy loops and ships with 25+ built-in standard library modules, a native GUI toolkit, and seamless C and Python interop — ready for real-world projects.

Why Zamin?

Bytecode VM

Register-based bytecode VM with raw dispatch, specialized integer opcodes, and a peephole optimizer. Matches CPython on integer loops with 25+ built-in modules at your fingertips.

📝

Readable Syntax

Python-like syntax that feels natural from the start. Indentation-based blocks, clean expressions, and straightforward type annotations make your code easy to read and maintain.

📦

Self-Contained

Over 25 standard library modules ship out of the box. File I/O, networking, JSON, regex, math, datetime, and more—no external package manager required for everyday tasks.

🌐

Cross-Platform

Build and run on Linux, macOS, and Windows with a single codebase. The Zamin compiler and runtime are fully portable, so your projects go wherever you do.

🔌

Extensible

Write C extensions for performance-critical code, call Python libraries directly, or leverage NVIDIA CUDA for GPU-accelerated computation. Zamin plays well with the ecosystem you already know.

🖼

Built-in GUI

Create native desktop applications with the Sol GUI toolkit on Windows or Luna on Linux. Widgets, layouts, event handling, and styling are all part of the standard experience.

Quick Example

Here's a taste of what Zamin code looks like:

func greet(name) {
    print("Hello, {name}!");
}

func fibonacci(n) {
    if n <= 1 {
        return n;
    }
    return fibonacci(n - 1) + fibonacci(n - 2);
}

greet("World");

for i in 0..10 {
    print("fib({i}) = {fibonacci(i)}");
}

Performance

Zamin's bytecode VM with register-based architecture and JIT-inspired optimizations delivers strong performance across common workloads:

Integer loop (5M ops) vs Python 3
0.9x — matches Python
List push (500K) vs Python 3
1.5x slower
Recursive fib(32) vs Python 3
4.3x slower
String concat (100K) vs Python 3
13.4x slower

View detailed benchmarks →

Documentation

Edit this page on GitHub Last updated: July 2026