Serialization packages
Platform spec node
Serialization packages
Spec standingStandard
No architecture decision records under adr/ for this feature yet. Standard features must
publish at least one ADR or keep a ## Decisions summary on the hub.
- Compiler Mod SDK Beskid-side compiler-mod contracts, Beskid.Syntax mirror, declarative query, and typed AST operations.
- Language macros Module-level macro rules with fragment parameters, `name!` invocation, and typed AST expansion in any project kind.
- Metaprogramming Source generators, attributes that drive compiler plug-ins, and scheduling relative to other analyses. The broader generator roadmap may live in guides; v0.1 rules are normative here.
- Serialization packages Serialization core package, Serialization Mod, and format-specific packages (JSON).
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
scope | yes | yes |
features | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Package split
Serialization is split across three package roles:
| Package | Role |
|---|---|
Serialization Mod (type: Mod) | Defines [Serialize] via AttributeGenerator; implements Generator for serializer emission |
| Serialization (library) | References Serialization Mod; exposes common metadata APIs for serializable types |
| Json (library) | Format-specific read/write primitives consumed by generated serializers |
Attribute ownership
The [Serialize] attribute is defined in Serialization Mod, not in Compiler Mod SDK core. Host projects depend on Serialization (library), which transitively loads Serialization Mod through the dependency graph.
Generation model
Serialization Mod generators:
- Collect types annotated with
[Serialize]throughCollectorcontracts. - Emit typed AST (for example
extend typehelpers and format adapters) through incrementalGeneratorcontracts. - Never emit formatted source text; output is structural AST only.
Analyzers in Serialization Mod validate serializable shape constraints before lowering.