Script Language

WRITE FAST.
RUN FASTER.

Script Logo

Script

A NATIVE LANGUAGE

With Script you can write high-performance code that compiles directly to native machine code, achieving speeds comparable to C and Rust.

No need to sacrifice developer experience for performance: the syntax feels familiar to JavaScript developers, while delivering native execution speeds.

1// Fibonacci with native performance
2
3function fib(n: i32): i32 {
4 if (n <= 1) {
5 return n;
6 }
7
8 return fib(n - 1) + fib(n - 2);
9}
10
11function main(): void {
12 const result: i32 = fib(40);
13 console.log(result);
14}

Example Program

Recursive Fibonacci

Try it Now
Traditional Interpreters
1x

JavaScript (V8 JIT)

18x

Script (Native Compilation)

20x

C (GCC -O3)

Compiler

A SELF-HOSTING COMPILER

Script's compiler is written in Script itself, demonstrating the language's capability to handle complex, real-world applications.

The compilation pipeline includes a borrow checker inspired by Rust, ensuring memory safety without garbage collection overhead.

Multiple backends are supported: Cranelift for fast JIT compilation, LLVM for optimized AOT binaries, and a portable VM for interpreted execution.

Memory Safety

RUST-INSPIRED SAFETY

Script brings Rust's ownership model to a JavaScript-like syntax, preventing common bugs like null pointer dereferences and data races at compile time.

The borrow checker analyzes your code to ensure references are always valid, eliminating entire classes of runtime errors without runtime overhead.

1// Ownership and borrowing (TypeScript syntax, Rust safety)
2
3function process(data: MutRef<Vec<i32>>): void {
4 data.push(42);
5}
6
7function main(): void {
8 let numbers: Vec<i32> = Vec.new();
9
10 process(numbers.mut());
11
12 // Borrow checker ensures safety
13 console.log(numbers.len()); // 1
14}

Memory Safety

Ownership & Borrowing

Learn More

Features

WHY SCRIPT?

Native Performance

Compiles to native machine code, achieving speeds comparable to C and Rust.

Memory Safety

Rust-inspired ownership system prevents bugs at compile time without GC overhead.

Familiar Syntax

JavaScript-like syntax means you can be productive from day one.

Self-Hosting

The compiler is written in Script itself, proving the language's capabilities.

Type Inference

Strong static typing with intelligent inference reduces boilerplate code.

Multiple Backends

Cranelift JIT, LLVM AOT, or portable VM - choose what fits your needs.