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

One bundled dependency inside a spudpack. More...

#include <spudpack.h>

Public Attributes

std::string name
 Bare include name, matching <name>.spp on the install root.
 
std::vector< std::uint8_t > bytes
 Full byte stream of the bundled dep's spudpack.
 
std::uint32_t version_tag {1}
 Monotonic install counter the dep carried when bundled. Defaults to 1 for v3 decodes.
 

Detailed Description

One bundled dependency inside a spudpack.

Each dep is the complete byte stream of another spudpack referenced by an include <name> statement in the parent program. Names match the bare identifier used in include and follow the same rules as installed template names: nonempty, no /, no NUL, not . or ... Bytes are kept opaque - the consumer decodes them through spudpack_decode when an include statement actually fires at runtime.

version_tag is the monotonic install counter the dep carried at the time the parent was bundled. Used for drift comparison against the currently-installed dep at run time. v3 packs decode with version_tag = 1 by default; v4 reads the field explicitly.