Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Serialization packages

Platform spec node

Serialization packages

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Package split

Serialization is split across three package roles:

PackageRole
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:

  1. Collect types annotated with [Serialize] through Collector contracts.
  2. Emit typed AST (for example extend type helpers and format adapters) through incremental Generator contracts.
  3. Never emit formatted source text; output is structural AST only.

Analyzers in Serialization Mod validate serializable shape constraints before lowering.