Download

Examples

Whole programs from the repository, with what they print. Each one runs in the test suite, so the output shown is the output the program gives today.

hello

The first program: it prints a greeting.

fizzbuzz

The numbers from 1 to 100, with Fizz, Buzz and FizzBuzz for the multiples of 3, of 5 and of both.

fibonacci

The 50th Fibonacci number, in a u64.

primes

The sieve of Eratosthenes, up to 100.

mandelbrot

The Mandelbrot set, drawn in characters.

rule110

Rule 110, a one-dimensional cellular automaton, one row per generation.

mowitnow

Lawn mowers driven across a grid: enums, a trait, an exhaustive match, and an input file that @comptime reads during the build.

brainfuck

A Brainfuck compiler: it turns a program into the bytecode of the Vader VM and runs it, in memory.

raycaster

A first-person walk through a hangar full of zombies. The engine draws every frame in Vader, pixel by pixel; raylib opens the window. Its output is that of the frames entry, which draws the game's views in characters.

raylib_sprite

A window and a sprite that the arrow keys move, through raylib.