15.1 What is a mod
type Mod projects, artifact-driven discovery, and what mods are not.
What is a mod
A compiler mod is a type: Mod package in the dependency graph whose compiled AOT artifact exports SDK contract implementations—generators, analyzers, rewriters—not random scripts the CLI evals.
Not these things
Section titled “Not these things”| Thing | Mod? |
|---|---|
Rust proc-macro inside beskid_analysis | Host implementation detail |
Language macro items | Language macros — parallel feature |
User contract Disposable | Structural type contract—different namespace |
meta { } blocks in old designs | Removed—Collector owns scope |
Discovery
Section titled “Discovery”Manifest attachTo folklore is dead. During mod.load the host:
- Resolves transitive
Moddependencies fromCompilePlan - Loads AOT artifact for target triple + cache key
- Reads
mod.descriptor.json/ export table - Schedules
(contractId, typeId, entrySymbol)tuples
Duplicates → E1829 / E1851–E1870 before collect runs (Compiler Mod SDK — discovery).
Compiler never in Beskid
Section titled “Compiler never in Beskid”The reference compiler host is Rust-only. Mods extend compilation; they do not replace beskid_analysis.