Expand description
The bundle: a manifest and the blobs it names, as one file.
It is a zip, and deliberately nothing more — unzip -l reads it:
opys.json the head: the bundle's format, and its options
manifest.json the manifest, whole
blobs/<sha256> one entry per blobThe head is about the bundle and the manifest is about the installation,
and the two are kept apart for that reason. The head is the first entry
and is stored uncompressed, so what a bundle is can be read with one seek,
or off the front of the file by something that never parses a zip at all.
It says the format and the options a player may set; whatever else is
worth knowing about a bundle without decoding megabytes of manifest goes
there.
manifest.json is a Manifest as opys-core reads and writes it, and
nothing else: the container adds no spelling of its own.
Structs§
- Bundle
- An open bundle: its manifest, decoded, and its blobs, still in the file.
- Choice
- One value a
selectoffers, and what to call it. - Head
- What a bundle says about itself, apart from the installation it carries.
- Label
- What every option says about itself to the person choosing.
- Options
- A bundle’s options, checked as a whole: a tree that has been read is one a form can be drawn from without looking at it twice.
Enums§
- Blob
Source - Where a blob’s bytes are before the manifest is published: a file on this
machine, or bytes a plugin produced. This is build-machine state and is
never part of a manifest — which is the whole difference from the
fileandbytessources it replaces. - Bundle
Error - Option
Def - One option.
nameis the variable it fills or, for aFeature, the feature it switches.
Constants§
- BUNDLE_
FORMAT - The format this reader and writer speak. A bundle that says anything else is refused before another byte of it is interpreted.
Functions§
- blob_id
- The id of the blob holding exactly
bytes. - blob_
id_ of - The id and length of the blob holding what
readeryields, without holding it in memory. - open_
bundle - Open a bundle and decode its manifest. A manifest that names a blob the bundle does not hold is refused here, not halfway through an install.
- read_
bundle_ head - Read a bundle’s head and nothing else. Costs the zip’s directory and a few bytes, whatever the bundle weighs.
- write_
bundle - Write
manifestand the blobs it names as a bundle, underhead.
Type Aliases§
- Blobs
- Blob id → where its bytes are. Ordered, because a bundle is written from it and must not differ between two builds of the same thing.