Goroutine-Style Concurrency
Lightweight Tasks with work-stealing scheduler. Write async code that looks synchronous. Start thousands of concurrent tasks without OS thread overhead.
Compile-time type safety. Lightweight concurrency. Familiar syntax.
Lightweight Tasks with work-stealing scheduler. Write async code that looks synchronous. Start thousands of concurrent tasks without OS thread overhead.
All types verified at compile time. Zero runtime type checks. No 'any', no escape hatches. Sound type system that catches bugs before they run.
Familiar syntax that TypeScript developers already know. Write code that feels like TypeScript, compiles like Rust.
Type-aware instructions (IADD, FADD) enable unboxed operations. Monomorphization at compile time like Rust/C++.
Type-safe sum types with exhaustiveness checking. Pattern match on discriminant fields for compile-time guarantees.
Core modules (logger, math, crypto, time, path) and system modules (fs, net, http, process). Everything you need to build real applications.
typescript
import io from "std:io";
// Async functions create lightweight Tasks
async function fetchUser(id: number): Task<string> {
return `User ${id}`;
}
function main(): void {
// Tasks start immediately - no explicit spawn
const tasks = [fetchUser(1), fetchUser(2), fetchUser(3)];
// Await array of tasks - returns array of results
const users = await tasks;
for (const user of users) {
io.writeln(user);
}
}Early Project
Raya is in active development. APIs may change. Not ready for production. But if you're curious about:
...then Raya might be worth watching.
| What | How |
|---|---|
| Explicit over implicit | Discriminated unions, type annotations required |
| Safety over convenience | No escape hatches, sound type system |
| Performance through types | Static types → typed opcodes → unboxed operations |
| Familiar syntax | TypeScript-compatible where it makes sense |
| Predictable semantics | No prototype chains, no coercion magic |
typescript
// Synchronous I/O becomes concurrent with async prefix
import fs from "std:fs";
const task1 = async fs.readTextFile("a.txt"); // Starts immediately
const task2 = async fs.readTextFile("b.txt"); // Runs in parallel
const a = await task1; // Suspend until ready
const b = await task2;typescript
// Discriminated unions with exhaustiveness checking
type State =
| { kind: "loading" }
| { kind: "success"; data: string }
| { kind: "error"; message: string };
function handle(state: State): void {
if (state.kind == "loading") {
logger.info("Loading...");
} else if (state.kind == "success") {
logger.info(state.data); // Compiler knows 'data' exists
} else {
logger.error(state.message); // Compiler knows 'message' exists
}
}any type - all values have known typesAll I/O is synchronous. Concurrency achieved with Tasks at call site.
bash
curl -fsSL https://raya.land/install.sh | shBuild from source:
bash
git clone https://github.com/rizqme/raya.git
cd raya
cargo build --release -p raya-cliWhat works:
What's coming:
Tests: 4,121+ tests passing (engine, runtime, stdlib, CLI, PM)
MIT OR Apache-2.0