Recipes

Recipes :: # (opaque)

Recipes for programs many projects fetch. A recipe is what Fetch takes: a function from a System, such as "x86_64-linux", to where the program is downloaded from there. It only answers; nothing is fetched until blueprint runs, and Blueprint.lock holds the digest of each download.

Programs([
	Fetch("roc-stable", Recipes.roc_nightly("nightly-2026-10-04-130536d")),
	Fetch("tool", Recipes.file("https://example.org/releases/1.0/tool-{system}")),
]),

A project writes its own as a function, best with its type, so that a mistake in it is reported where it is:

tool : System -> Config.Download
tool = |system|
	match system {
		"x86_64-linux" => File("https://example.org/releases/1.0/tool-linux")
		"aarch64-darwin" => File("https://example.org/releases/1.0/tool-macos")
		_ => Unavailable
	}
file : UrlTemplate -> (System -> Download)

A program that is one file at a URL which names the System: "{system}", "{arch}" and "{os}" in the template stand for the System asked about and its two parts. The program exists for every System; a recipe of the project's own says otherwise with Unavailable.

roc_nightly : NightlyTag -> (System -> Download)

The Roc compiler of one release of roc-lang/nightlies, named by its tag, as in nightly-2026-10-04-130536d. The archive is kept whole: on macOS roc links with the darwin directory beside it. A System the nightlies are not built for is Unavailable.