spudplate
Template scaffolding compiler for spudlang .spud files
Loading...
Searching...
No Matches
spudplate::Spudpack Struct Reference

A decoded spudpack - the source text, the opaque compiled program, every bundled asset, and every bundled dependency. More...

#include <spudpack.h>

Public Attributes

std::string source
 Original .spud source text.
 
std::vector< std::uint8_t > program_bytes
 Opaque serialised AST; decoded by the binary serializer.
 
std::vector< SpudpackAssetassets
 Every bundled asset referenced by the program.
 
std::vector< SpudpackDepdeps
 Every bundled dependency referenced by include statements.
 
std::uint8_t version {4}
 Spudpack format version that produced these bytes. Threaded into the binary serializer so trailing-optional fields decode correctly across versions.
 
std::uint32_t version_tag {1}
 Monotonic install counter for this template. Bumped on each install that produces different content. v3 decodes default to 1.
 

Detailed Description

A decoded spudpack - the source text, the opaque compiled program, every bundled asset, and every bundled dependency.

program_bytes is held opaquely; this header does not include the binary-serializer header so the codec stays decoupled from the AST. Decoding program_bytes into a Program is the caller's job.