Expand description
program — the immutable result of compiling a Song
(ADR 0003).
A Program is the artifact applications render, ship, and (from
1.10.0-alpha.3) run: the resolved SoundDoc, the musical metadata a
transport needs, bounded resource estimates, streaming-coverage warnings,
and a canonical content hash — all under three independently evolving
version pins (SCHEMA_VERSION, ENGINE_VERSION, PROGRAM_VERSION).
A Program is immutable by convention: it is validated and resolved, so
mutating a public field invalidates Program::hash (a round-trip
through Program::from_json re-verifies and catches it).
This API is stable — frozen at 1.10.0-rc.1 (docs/api-tiers.md).
Structs§
- Program
- A compiled song: validated, resolved, hashed. Built by
Song::compile; reloaded byProgram::from_json. - Program
Meta - The musical facts of a compiled song, resolved once at compile time.
- Resource
Estimates - Bounded estimates of what a Program costs to render or run. Upper bounds are stated where an exact figure isn’t cheap; the runtime preallocates from these (ADR 0005).
- Track
Meta - One track’s identity and role in a compiled program.
Enums§
- Program
Error - Why a serialized
Programfailed to load.
Constants§
- PROGRAM_
VERSION - The current Program bundle format revision. A Program records the revision it was compiled with; a loader rejects a bundle newer than itself. Bumped when the serialized shape (or its semantics) changes — independently of the document schema and DSP engine revisions.
Functions§
- content_
hash - The canonical content hash of a resolved document: FNV-1a over its canonical JSON. Independent of the authoring structure and of serialization formatting — equivalent songs hash equal, from Rust or Python alike.