Skip to content

Native · WebAssembly · Node

Fast programs, everywhere

A typed language that compiles to native binaries and WebAssembly.

import system;
import system.collections;

fun main() {
    let scores: Map<string, int> = {
        "Ada": 92, "Sam": 78
    };

    for (let entry in scores) {
        System.println($"{entry.key}: {entry.value}");
    }
}

Why Dream

Native and WebAssembly

One codebase builds a native executable, a browser module, or a Node module.

ARC that compiles away

Last-use moves, inferred borrows, and retain elision remove most reference counting at build time.

Seamless interop

Call C and C++ with @c and @cpp, and JavaScript with extern and the js type.

Typed web APIs

Compile-time routing, validation, authentication, OpenAPI, and WebSockets in the standard library.

Zero-cost generics

Generic code is specialized for each type you use, with no runtime dispatch.

Async and parallel

async/await for waiting work, Task for parallel CPU work, both owned by structured scopes.

GPU programming

Write compute, vertex, and fragment shaders in Dream for native and browser programs. Explore GPU programming.

Explore the docs

Learn

Install Dream, take the tour, and build your first project step by step.

6 pages
Language

Every Dream language feature, grouped by topic.

40 pages
Standard library

Collections, text, files, networking, JSON, time, and more.

36 pages
GPU and ML

Write shaders in Dream and run compute, graphics, and small neural networks on the GPU.

4 pages
Web server

Typed HTTP services with routers, validation, auth, OpenAPI, and WebSockets.

19 pages
Deploy

Package apps for desktop, browser, Node, and mobile, and publish packages.

8 pages
Tooling

Create, build, test, and manage projects with dreamer, plus editor and formatter setup.

11 pages
Cookbook

Small, complete programs you can run and change.

8 pages
API reference

Exact public declarations for every standard-library package.

29 pages