Examples

Real programs written in Aria — from hello world to TCP servers.

Browse on GitHub

Programs

Complete, runnable programs demonstrating real-world Aria patterns.

Tutorials

Progressive, educational examples that walk through the full language — one topic at a time.

01 — Hello World

Module declarations, function definitions, and string interpolation.

02 — Types & Variables

All primitive types, constants, type aliases, and struct defaults.

03 — Functions

Regular and single-expression functions, generics, closures, and higher-order functions.

04 — Control Flow

If/else expressions, match with guards, for loops, while, and labeled break.

05 — Error Handling

Result types, custom error types as sum types, the ? operator, and catch blocks.

06 — Structs & Traits

Struct definitions, trait definitions, impl blocks, and trait bounds.

07 — Enums & Pattern Matching

Sum types, exhaustive matching, nested patterns, and guard clauses.

08 — Collections & Pipelines

Lists, Maps, Sets, and the pipeline operator with filter/map/fold chains.

09 — Concurrency

Spawn, scope blocks, channels, and fan-out/fan-in patterns. (select: Coming soon)

10 — Advanced Error Handling

Error hierarchies, retry patterns, fallback chains, and combining Results.

11 — Modules & Imports

Module declarations, visibility rules, use imports, and re-exports.

12 — Resource Management

With statements for automatic cleanup, Drop trait, and nested resource management.

13 — Testing

Test blocks, assert, table-driven tests, fixtures, and benchmarks.

14 — Generics

Generic functions, multiple bounds, where clauses, and phantom types.

15 — HTTP Server

Routing, JSON handling, error responses, concurrency, and middleware patterns.

16 — CLI Tool

Argument parsing, subcommands, file I/O, formatted output, and pipelines.