Compiled & fast
Transpiles to Go, then compiles to a native binary. No interpreter, no VM — just raw performance.
ScarScript is a statically typed programming language with Express-like syntax that transpiles to Go — readable code in, native binaries out. No runtime, no virtual machine, no compromise on speed.
func greet(name: str) {
print("Hello, {name}!")
}
greet("world")Hello, world!ScarScript transpiles to Go and compiles to native binaries — raw metal performance with a cleaner syntax.
Simple accumulation: for i in 1..10000000 { sum = sum + i }
| Language | Time | vs ScarScript | Runtime |
|---|---|---|---|
| ScarScript | 0.165 s | 1.00× (baseline) | Native binary |
| Go Go (reference) | ~0.155 s | 1.06× faster | Native binary |
| JS Node.js (v20) | ~0.95 s | 5.8× slower | V8 JIT |
| Py Python (3.11) | ~3.8 s | 23× slower | CPython interpreter |
mut sum = 0
for i in 1..10000000 {
sum = sum + i
}
print("Sum: {sum}")$ scar build bench.scar -o bench
$ time ./bench
# Output
Sum: 50000005000000ScarScript keeps the language approachable while relying on a real compiler and Go's native toolchain.
Transpiles to Go, then compiles to a native binary. No interpreter, no VM — just raw performance.
Catch bugs at compile time with full type inference, strict rules, and precise file:line:col errors.
func, val / mut / const, for..in, string interpolation — feels familiar from day one.
Go-style (int, bool) tuples with destructuring: val a, b = divide(10, 2).
Built-in modules: math, file, sys, time. No package manager needed.
Full closures with variable capture. Functional patterns work out of the box.
Write a .scar file. The compiler checks it, generates Go, and hands off to the Go toolchain.
hello.scarscar build hello.scar./helloStart with installation, learn the language, then keep the references close as you build.
ScarScript is open source. Meet the people who have contributed to its code.
Meet all contributorsPick up the guide, get the compiler, and start writing ScarScript.