Playground

Write Caju and run it right here. The compiler itself runs in your browser, compiled to WebAssembly: nothing is sent to a server.

Ctrl+Enter runs
Output
Press Run (or Ctrl+Enter) to see what the program prints.

How it works

The Caju compiler is written in Caju and compiles to WebAssembly with --target wasm, so it can compile itself to caju.wasm. The page downloads that file from the language's latest release, with the standard library. When you press Run, it compiles your program to another WebAssembly module and runs it in a worker, with the output streamed back here. A program can have several files: main.caju runs first and imports the others with import "util".