Project settings¶
Use dream.toml to describe your app, its dependencies, and the environments it supports.
The manifest: dream.toml¶
dream.toml is the project file at the root of every Dream project managed by dreamer:
[package]
name = "myapp"
version = "0.1.0"
type = "bin" # "bin", "lib" or "test" (default: bin)
edition = "2026"
authors = ["Jane Doe <jane@example.com>"]
description = "My Dream app"
entry = "src/main.dream" # required for bin; forbidden for lib
license = "MIT"
keywords = ["http", "json"] # optional; used by dreamer search / the registry site
targets = ["native", "web"] # optional hosts: native, web, node (omit = no preference)
icon = "assets/icon.png" # optional PNG app icon for windows, the Dock and packed apps
assets = ["data", "config.json"] # optional files copied next to the build output (bin and test)
[dependencies]
http-utils = "1.2" # semver requirement, resolved from a registry
json-tools = { version = "0.3", registry = "default" }
local-lib = { path = "../local-lib" } # local path dependency
vendored = { git = "https://github.com/user/vendored-dream", tag = "v1.0.0" }
[dev-dependencies]
test-utils = "0.4"
[scripts]
start = "dreamer run"
[registries]
default = "https://raw.githubusercontent.com/sps014/dream-registry/main"
Sections¶
A manifest needs [package], [workspace], or both.
| Section | Purpose |
|---|---|
[package] |
Name, version, kind and metadata of this package |
[dependencies] |
Packages your code imports |
[dev-dependencies] |
Extra packages installed for tests and local work, never published as requirements |
[registries] |
Registry aliases mapped to base URLs |
[scripts] |
Named commands kept as project notes; dreamer does not run them |
[test] |
Hosts a test package runs on (type = "test" only) |
[lib] |
Native library kind, output-type = "staticlib" or "cdylib" (type = "lib" only); see Native libraries |
[workspace] |
Member package folders; see Workspaces |
[native.<set>] |
C/C++ sources and build flags; see C interop |
[[generators]] |
Compile-time source generators; see Generators |
[package] keys¶
| Key | Required | Default | Meaning |
|---|---|---|---|
name |
yes | — | Package name: starts with a letter; ASCII letters, digits, -, _, . |
version |
yes | — | Semantic version, such as 1.2.3 |
type |
no | bin |
bin, lib or test |
entry |
bin only |
— | Source file to compile; not allowed on lib or test |
edition |
no | none | Language edition, such as 2026 |
authors |
no | [] |
Author strings, published to the registry |
description |
no | none | One-line summary, published and searched |
license |
no | none | License identifier, published to the registry |
keywords |
no | [] |
Search words for dreamer search and the registry site |
targets |
no | [] |
Hosts: native, web, node; not allowed on test |
icon |
no | none | PNG app icon path; not allowed on test |
assets |
no | [] |
Files and folders copied next to the output; not allowed on lib |
links |
no | none | Name of the native library this package provides; see C interop |
Dependency keys¶
A dependency is a bare version requirement string, or a table with these keys:
| Key | Meaning |
|---|---|
version |
Semver requirement resolved from a registry |
registry |
Registry alias from [registries] (default: default) |
path |
Local folder; may be combined with version so the package can still be published |
git |
Git repository URL |
tag, branch, rev |
Which Git revision to use; at most one, and only with git |
path cannot be combined with git or registry, and git cannot be combined with registry.
Details¶
[package].typeisbin(default),libortest.- Libraries omit
entry, are not runnable (dreamer run/dreamer packerror), and are typechecked via the conventionalsrc/<import_segment>.dreamroot (http-utils→src/http_utils.dream,foo.bar→src/foo_bar.dream). - Binaries require
entryand a top-levelmain. -
Test packages omit
entry,targetsandicon. Every.dreamfile in them is part of the suite, run withdreamer test(they cannot be built, run, packed or published). An optional[test]table sets the hosts the suite runs on:[test]accepts onlytargets, and only on test packages. See Test a project. -[package].assetslists files and folders, relative to thedream.tomldirectory, that the program reads at run time. Allowed onbinandtestpackages (an error onlib). - They are copied into the output folder:target/debugortarget/releasefor native,target/webandtarget/nodefor wasm,target/test/debug,target/test/releaseortarget/test/nodefor test runners, and next to the executable indreamer packoutput. - A program with assets runs with its output folder as the working directory, so it opens them with the same relative paths it uses in the project (FileHandle.open("data/words.txt", FileMode.Read)). - Paths must stay inside the project: no absolute paths and no... -[package].entryis the filedreamer build/dreamer runcompile (bin only). - Package builds emit wasm undertarget/web/(debug and--releaseshare that folder) and native binaries undertarget/debug/ortarget/release/. - Baredream file.dream(no enclosingdream.toml) still uses<source-dir>/target/web/(wasm) ortarget/debug|release/(native) — never siblings next to the.dreamfile. - Node hosts also gettarget/node/(copied fromtarget/web/bydreamer build/dreamer runwhentargetsincludesnode). - Scaffoldedindex.html/run.mjsimporttarget/web//target/node/— no need to edit them when switching debug ↔ release. - Existing projects that hardcodetarget/debug/…should retarget once totarget/web//target/node/. -[package].targetsis an optional list of hosts this project supports:native(dream run),web(browser +*.web.runtime.js), and/ornode(Node ≥ 18 +*.node.runtime.js). - Omit the field (or leave it empty) for today's free-choice behavior —dreamer rundefaults to native. - Combinations are allowed; seedreamer runbelow for how the host is chosen. -[package].iconis an optional path to a PNG (relative to thedream.tomldirectory). It is the only place an app icon is configured. -dreamer build,runandpackcompile it into native binaries, so no file is read at run time. Windows executables use the embedded icon. -dreamerchecks that the file exists and is a PNG, and warns when it is not square or is smaller than 256x256. - See CLI packaging for native output layouts. - Web builds use it as the favicon thatdreamer run --target webserves. - A dependency is either a bare semver requirement string, or a table using the dependency keys above. - Package names must start with a letter and may contain ASCII letters, digits,-,_, and.. - The registry identity is always the full name string as written indream.toml/dream.lock(e.g.json-tools,foo.bar). - On disk and inimportstatements, hyphens and dots map to underscores:json-tools→import json_tools;,foo.bar→import foo_bar;. - A dottedimportpath still means a subpath inside a package (import json_tools.parse;→dream_packages/json_tools/src/parse.dream), never a registry name with a dot — so the registry packagefoo.baris always imported asimport foo_bar;, notimport foo.bar;. -[registries]maps registry aliases to base URLs; a dependency'sregistry = "..."picks one, defaulting to thedefaultalias. -[scripts]is currently informational project metadata — nodreamersubcommand executes it yet, but it's a stable place to document how a project is normally built/run/tested.