AttoLang Executable showcase Open playground
REAL RUST COMPILER · REAL WASM GUESTS

Code that actually runs.

These 43 language programs compile with the exact SHA-pinned Atto Rust/Wasm browser compiler. Choose Compile & execute to load the unchanged Atto source and run the generated guest WebAssembly in a disposable Worker. The output shown here is the expected test oracle, not a prerecorded execution.

This showcase is limited to the pinned browser compiler. It does not establish Java, LLVM, .NET or other backend parity. Unsupported design previews remain separately labeled in the playground and never generate a fake guest.

Control flow & functional programming

Pattern matching, generators, lambdas and pipelines, executed by the pinned compiler.

Boolean: && || Xor

Expected main() → 0

STDOUT false ↵ true ↵ true ↵ false ↵ true ↵ true ↵ false ↵ true ↵ true ↵ false ↵ true ↵ true

Types, modules & ownership

Compiled contracts for types, traits, modules, lexical scope and ownership.

Structs vs records vs tuples vs Pair / Entry

Expected main() → 0

STDOUT 3 ↵ paid ↵ (7, paid) ↵ Pair(widgets, 2) ↵ Entry(widgets, 2)

Error handling & algebraic data

Results, Options, trapping and unwind behavior, with executable guest oracles.

trap keyword — catch throws / Option / Result

Expected main() → 7

STDOUT 5 ↵ id must be nonnegative ↵ an ordinary throw was caught

defer / recover — raise and escaped throw

Expected main() → 63

STDOUT raise finally ↵ raise cleanup A ↵ raise cleanup B ↵ recovering raise ↵ throw cleanup ↵ recovering unhandled throw ↵ caught