SunScript: Fast, Bright, and Concurrent.

Harness the power of modern asynchronous programming with a syntax designed for clarity and speed. Write less, run faster.

Why Choose SunScript?

Built-in Concurrency

SunScript utilizes a unique 'Beam-and-Glow' model for parallel execution, making complex asynchronous tasks simple and lock-free.

Readable Syntax

Keywords like **`say`** and **`loop`** replace verbose boilerplate, leading to cleaner, more intuitive code that is easier to maintain.

🚀

Blazing Fast

Compiles to highly optimized native code, offering near-C performance without sacrificing the dynamic feel of a scripting language.

Get Started in Seconds

SunScript version 10.5 is available across all major operating systems. Choose your installation method below.

Installation via Sun-Installer (Recommended)

Run this command in your terminal to automatically install the latest stable version and set up your PATH variables.

Alternative: Manual Download

Documentation: Code Clarity

⬇️ Download Full Documentation (PDF)

Basic Output and Looping

SunScript prioritizes simplicity. Use the **`say`** keyword to print output, and the **`loop`** keyword followed by a number and semicolon to run a block of code a specified number of times.

Concurrency Example

The `ray` keyword creates a lightweight, isolated concurrent process (a "ray"). Data is passed between rays using atomic `cell` structures, eliminating race conditions.

View Online Language Specification →
// File: main.sun

beam welcomeMessage() {
    // Printing to console using the 'say' keyword
    say "Welcome to SunScript!";
}

// The main execution point (like main())
shine {
    welcomeMessage();

    // Looping 3 times using the 'loop' keyword
    loop 3; {
        say "Loop iteration...";
    }

    // Concurrency: Launch a concurrent process
    ray timerRay = newRay({
        say "Ray process started.";
    });

    say "Main execution continues.";
    awaitRay(timerRay); // Wait for ray to finish
}