SpectraBuild
Standalone Spectra build orchestration, written in Prism.
The executable treats prism and typst as explicit external tools. Deck construction and Typst lowering remain pure package code; this module is the narrow host shell that captures the framed envelope and writes artifacts. The pipeline a spectra build runs, end to end:
prism docs <project> --test doctest outputs pinned before anything renders
prism run <project> the deck program prints its framed envelope
(pure lowering) the envelope's deck value becomes Typst source
typst compile Typst renders the PDF
target/spectra/ deck.typ and deck.pdf installed atomically
check_project verifies the tools and the deck without writing artifacts; clean_project removes only target/spectra.
Types
DeckEnvelope
type DeckEnvelope = DeckEnvelope {
source: String,
logical_slides: Int,
physical_pages: Int,
title: String
} deriving (Eq, Show)
Functions and Values
shell_quote
shell_quote : (String) -> String
Quote one opaque argument for the POSIX shell used by system.
parse_envelope
parse_envelope : (String) -> Result((DeckEnvelope, String), String)
check_project
check_project : (String) -> Int ! {IO, Output}
build_project
build_project : (String, String, Bool) -> Int ! {FileSystem, IO, Output}
clean_project
clean_project : (String) -> Int ! {IO}