Modern design.
Bare-metal control.

A statically-typed, compiled language for systems programming. Manual memory management for predictable performance.

package main

func main() {
    // Array programming
    a := [4]int{1, 2, 3, 4}
    b := [4]int{10, 20, 30, 40}
    
    // Element-wise addition
    c := a + b
    
    // Inline C for performance
    x := 42
    #inline "printf(\"C says: %d\\n\", ${x});"
}

No Garbage Collection

Complete control over memory with make, append, and free. Designed for predictable performance in systems programming.

C89 Backend

Compiles to portable C89 code. Run Saurus anywhere you have a C compiler, from embedded devices to supercomputers.

Clean Modern Syntax

A readable, minimal syntax that feels familiar yet distinct. Designed to reduce boilerplate while maintaining strict type safety.

Vector Operations

Built-in support for array programming. Perform element-wise arithmetic operations on arrays directly, simplifying math-heavy code.

Inline C

Seamlessly embed raw C code with #inline for easy FFI and maximizing performance when you need it most.

Code Examples

Dynamic Arrays

func main() {
    nums := make([dynamic]int, 0, 4)
    nums = append(nums, 1, 2, 3)

    for i, v in nums {
        printf("nums[%d] = %d\n", i, v)
    }
    free(nums)
}

Structs & Pointers

struct Point {
    x int
    y int
}

func main() {
    p := new(Point)
    p.x = 10
    p.y = 20
    free(p)
}

Installation

Clone the repository and build with Make:

git clone https://codeberg.org/saurus/saurus.git
cd saurus
make