bundle-stable.tri (635B)
1 !import bundle_support * 2 !export assemble 3 4 -- Native stable-backend consumer. bundle_support supplies already-published 5 -- prelude and binary-layout helpers; no dependency gate or counting protocol. 6 -- Inputs are finite byte lists, as in sourceBundleAssemble. This uses the 7 -- public contracted length helper, unlike the reference's private counter. 8 9 assemble manifest nodes = (let manifestSize = length manifest in 10 let nodesSize = length nodes in 11 append sourceBundleHeader 12 (append (sourceBundleSection 1 96 manifestSize) 13 (append (sourceBundleSection 2 (add manifestSize 96) nodesSize) 14 (append manifest nodes))))