Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Try it in the browser

The playground runs Rask without installing anything. It’s the interpreter compiled to WebAssembly, so the code runs in your browser rather than on a server.

Open the playground →

Write code on the left, Ctrl+Enter to run, output on the right. Run tests runs the file’s test blocks instead of main. The examples dropdown loads the programs from examples/, and Copy link gives you a URL with your code in it.

What it can’t do

A browser has no files, no sockets, no clock and no threads, so anything needing one of those is refused with a message rather than half-working:

fs, io, net, httpno filesystem or sockets
timeno clock — which is also why benchmark blocks don’t run here
spawn, Thread.spawn, using Multitasking, using ThreadPoolno threads
extern "C", import cno libc to call

Everything else runs: collections, structs, enums, generics, traits, pattern matching, closures, error handling, comptime. Recursion is capped a few hundred frames deep, because the browser puts a much lower ceiling on call depth than an OS thread does.

The dropdown only lists examples that actually run here. The rest are in examples/; to run those, install Rask and run the file directly.

Source

Playground UI · WASM bindings