Raya Language Expert
A comprehensive knowledge base for Raya — a statically-typed programming language with TypeScript syntax, featuring a custom bytecode VM with goroutine-style concurrency and zero runtime type checks.
What is Raya?
Raya is a modern programming language that combines:
- TypeScript-compatible syntax for familiarity
- Fully static type system with zero runtime type checks
- Goroutine-style concurrency with lightweight green threads
- Custom bytecode VM with typed opcodes
- Monomorphization for generics (like Rust/C++)
- Sound type system with no escape hatches
Quick Facts
| Aspect | Detail |
|---|---|
| Implementation | Rust (stable 1.70+) |
| Type System | Fully static, sound, no any type |
| Concurrency | Goroutine-style Tasks with work-stealing scheduler |
| Generics | Monomorphization (compile-time specialization) |
| I/O Model | Synchronous APIs + goroutines for concurrency |
| Tests | 4,121+ tests (0 ignored) |
Skill Contents
📚 Language
- Type System - Type checking rules, discriminated unions, generics
- Concurrency - Tasks, async/await, work-stealing scheduler
- Syntax - Import system, declarations, control flow
- Examples - Complete working programs
🏗️ Architecture
- Overview - High-level system design
- Crates - 8-crate structure and dependencies
- Compiler - Parser → IR → Bytecode pipeline
- Virtual Machine - Interpreter, scheduler, GC
- JIT/AOT - Native compilation features
📦 Standard Library
- Overview - Philosophy and I/O patterns
- Cross-Platform - 14 modules (logger, math, crypto, etc.)
- POSIX - 15 system modules (fs, net, http, etc.)
- Native IDs - ID ranges and dispatch mechanism
🛠️ CLI & Tools
- Commands - run, build, check, eval, repl, bundle
- Package Manager - Dependency management workflow
- REPL - Interactive shell usage
💻 Development
- Workflow - Worktree workflow, build commands
- Testing - Test infrastructure (4,121+ tests)
- Adding Modules - How to add stdlib modules
- Project Status - Completed and in-progress work
📖 Reference
- Quick Reference - FAQ and cheat sheet
- Common Tasks - Recipe-style task guide
- Documentation - Links to all design docs
Getting Started
For Users
- Read Language Syntax
- Review Standard Library Overview
- Check CLI Commands
For Contributors
- Understand Architecture Overview
- Review Development Workflow
- Check Project Status
For Language Learners
- Read Type System
- Study Examples
- Explore Concurrency Model
Design Principles
| Principle | Implementation |
|---|---|
| Explicit over implicit | Discriminated unions, required type annotations |
| Safety over convenience | No escape hatches, sound type system |
| Performance through types | Typed opcodes, monomorphization |
| Familiar syntax | TypeScript-compatible where possible |
| Predictable semantics | Well-defined execution model |
Version: 1.0.0
Last Updated: 2026-02-22
Repository: github.com/rayalang/rayavm
Source: rizqme/raya — distributed by TomeVault.