ScarScript logo

The Express-Like
Compiled Language

Pakistan's first high-performance compiled language. Static typing, Go-powered performance, zero runtime — with syntax you already love.

Quick Start Read the Docs GitHub
Written in Go Native binaries MIT License Cross-platform

Why ScarScript?

Everything you need in a modern language — nothing you don't.

Compiled & Fast

Transpiles to Go, then compiles to a native binary. No interpreter, no VM — just raw performance.

Static Type Checking

Catch bugs at compile time with full type inference, strict rules, and precise file:line:col errors.

Express-Like Syntax

func, val, for..in, string interpolation — feels familiar from day one.

Multiple Returns

Go-style (int, bool) tuples with destructuring: val a, b = divide(10, 2).

Zero Dependencies

Built-in modules: math, file, sys, time. No package manager needed.

Anonymous Functions

Full closures with variable capture. Functional patterns work out of the box.


Quick Start

Up and running in under a minute.

# Install from source
go install github.com/ScarfazeCompany/scar-script/cmd/scar@latest

# hello.scar
func greet(name: str) {
    print("Hello, {name}!")
}

greet("Zawiyar")

# Run it
scar run hello.scar

Download

Pre-built binaries for every platform — no Go required.

Windows

scar-windows-amd64.exe

Download

Linux

scar-linux-amd64

Download

macOS

darwin-arm64 / amd64

Download

Go Install

go install @latest

View Source

Language at a Glance

Readable like JavaScript. Safe like Go. Fast as a binary.

// Type inference — just use val / mut / const
val name = "Zawiyar"        // str
mut count = 0              // int
val price = 99.99           // dec

// Functions with multiple returns
func divide(a: int, b: int) (int, bool) {
    if b == 0 { return 0, false }
    return a / b, true
}

val result, ok = divide(10, 2)

// Closures
val double = func(x: int) int { return x * 2 }

// Smart fallbacks
val port = sys.env("PORT") or "8080"

// Built-in modules
val root = math.sqrt(16)     // 4.0
file.write("log.txt", "started")

Documentation

Everything you need to master ScarScript.

Getting Started

Install ScarScript and run your first program in minutes.

Language Syntax

Variables, control flow, loops, operators, and string interpolation.

Functions

Declarations, multiple returns, closures, and recursion.

Standard Library

math, file, sys, time — full reference with examples.