Blyx v0.1.0-alpha is here! Read the release notes ->
The Blyx Book

The Blyx Programming Language

A complete guide to Blyx — from your first program to writing GPU kernels, actor systems, and high-performance AI workloads. Written by Rahul Chaube.

01
Getting Started
Install Blyx, write your first program, understand project structure.
02
A Guessing Game
Build a complete program — user input, random numbers, loops, error handling.
03
Common Concepts
Variables, mutability, data types, functions, comments, control flow.
04
Functions & Closures
Function syntax, parameters, return types, closures and higher-order functions.
05
Ownership & Memory
Blyx's memory model — ownership rules, references, borrowing, slices.
06
Structs & Enums
Custom data types with structs, methods via impl, enums and Option.
07
Pattern Matching
match expressions, if let, while let, destructuring all Blyx types.
08
Traits & Generics
Polymorphism in Blyx — define traits, implement them, use generic bounds.
09
Error Handling
Result<T,E>, the ? operator, custom error types, when to panic.
10
Collections & Iterators
Arrays, vectors, hashmaps, iterator chains, map/filter/fold.
11
Actors & Concurrency
The Blyx actor model, spawn, send, join, work-stealing thread pools.
12
Tensors & AI
Native tensor<T,D1,D2> types, static dimension checking, neural networks.
13
GPU & Heterogeneous Compute
gpu {} blocks, SPIR-V and NVPTX targets, GPU memory management.
14
Async & Await
Futures in Blyx, async functions, await, async actors, async I/O.
15
Modules & Packages
The mod system, use paths, Blyx.toml manifest, blyxpkg, publishing.
16
Testing
Unit tests, integration tests, benchmark tests, test output.
17
Compiler Architecture
How blyxc works — lexer, parser, BIR, optimization passes, codegen.
18
Advanced Features
Unsafe Blyx, FFI, macros, custom allocators, compiler intrinsics.