Skip to content

The Dream language

Dream is statically typed and compiles ahead of time to a native binary or to WebAssembly. Memory is managed automatically by reference counting. Each page below covers one feature, with examples you can run.

Badges show where a feature works: Native for desktop executables, Browser and Node for WebAssembly output. New to Dream? Take the language tour first.

Basics

Variables, operators, control flow, and the everyday building blocks.

Functions

Declare functions, pass arguments, use closures, and produce lazy sequences.

Types

Primitives, arrays, ranges, tuples, options, classes, structs, enums, and casts.

Abstraction

Generics, interfaces, and custom operators for reusable code.

Concurrency

Async functions, tasks, structured scopes, cancellation, and worker pools.

Memory

Automatic reference counting, ownership, safety rules, and cleanup timing.

Metaprogramming

Generate or rewrite Dream code while your program builds.

Interop

Call JavaScript with ordinary Dream syntax.

Language rules

Modules, imports, panics, and the rules behind compiler errors.