Skip to content

Standard library

Dream includes a library for everyday tasks. Import the packages you need, such as import system.collections;. A few common types, including Option, Result, and Math, are available without an import. Shaders, rendering, and machine learning are in GPU and ML.

Each guide explains a task with examples. Entries with an API link also open the exact public declarations for that package in the API reference.

Core

Console, math, Option and Result, synchronization, and API errors.

Text and data

Strings, formatting, regular expressions, encodings, and SIMD.

Collections

Lists, maps, sets, queues, stacks, and queries over them.

System

Time, randomness, logging, testing, processes, and command-line arguments.

Files and network

Files, streams, paths, URLs, and HTTP clients.

Serialization

Turn values into data formats and back.

Security

Secure randomness, hashing, and encryption.

Code generation

Libraries for writing source generators.