High-performance
Systems Programming.

ZYL combines the control of C with modern ergonomics. No hidden allocations, true templates, and native LLVM generation.

Get Started Read Examples
examples/vector.zyl
import std.libc.io : { printf }
import std.arena

struct DynArray!T {
    T* data;
    int size = 0

    void push(DynArray!(T)* self, T val) {
        self.data[self.size++] = val
    }

    T opIndex(DynArray!(T)* self, int idx) {
        return self.data[idx]
    }
}

int main() {
    Arena arena = Arena{}
    defer arena.destroy()
    arena.create(1024)

    int* data = (int*) arena.alloc(sizeof int)
    DynArray!int arr = DynArray!int{data}
    arr.push(42)
    
    printf("Size: %d\n", arr.size)
    printf("data[0] = %d\n", arr[0])
    return 0
}

Built for Control.

Native Speed

Compiles directly to optimized machine code via LLVM. Manual memory management allows for predictable performance characteristics.

<T>

True Templates

Zero-cost generic programming. Write a `Vector!T` once, and the compiler generates specialized, optimized code for each type used.

C

C Interop

Seamlessly call C functions and link with existing libraries. No complex FFI barriers or overhead. Just import and use.

🛡️

Safety & Power

Modern features like optional types, defer, and explicit error handling give you safety without sacrificing low-level control.