Documentation overview

Meet Sun

An experimental scientific programming language built in Rust, with matrix-first computing and 1-based indexing.

Rust coreMatrix-first1-based indexingExperimental
01

What is Sun?

Sun is a proprietary, experimental language for numerical and matrix-oriented programs, implemented in Rust.

Sun includes a lexer, parser, interpreter, persistent sessions, matrix primitives, hosted graphics, and a developing LLVM backend. Interpreter and native coverage are intentionally not presented as equivalent.

02

A first program

This example exercises scalar precedence, matrix multiplication, and element-wise multiplication.

Sun
% Scalar and matrix operations
x = 2 + 3 * 4;
A = [1, 2; 3, 4];
B = A * A;
C = A .* A;
disp(x);
disp(B);
disp(C);
03

Implementation status

Sun is under experimental development. The interpreter supports typed arrays, dimensional reductions, multiple function outputs and project function files. Studio adds editable Workspace values, execution by section, debugging and tiled graphics. Native compilation supports a deliberately smaller numeric subset.

Source note

Content reflects the Sun 0.6 development snapshot, including changes not yet tied to a published release. Later builds may differ.

Jump in

Explore the documentation

Sun is proprietary software under experimental development. Documentation scope: Sun 0.6 development snapshot.