- The manifest seems to be the encode_persistent() form of the Component table, which means the first 8 bytes of the file are the metadata, correct? Are there additional bytes here before the header of the table begins?
yes, that seems to be the case. +Mitchell Kember can confirm
- The wire format docs indicate that a table contains a header followed by a vector of envelopes. Does the vector also have its own header, or are they one and the same?
a table is a vector of envelopes, so the header of a table is the header of a vector, i.e. a size and a pointer
- The wire format spec shows an ellipsized ("...") block between the header and envelopes. What is this meant to represent? Shouldn't the vector always follow the header?
the out-of-line data does not follow directly the inline data due to the traversal order https://fuchsia.dev/fuchsia-src/reference/fidl/language/wire-format#traversal-orderif you have a struct { string; vector<int32>; }the inline portion will have
- header of string
- header of vector
then the out-of-line blocks will be
- data for string
- data for vector
hence the header of the vector is not juxtaposed with its out-of-line block, but one block away (due to the out-of-line portion of the string)hth
The out-of-line contents will be laid out in traversal order, depth-first traversal of the types.You start by the first type, write the inline portion, then traverse the first element of this type. If this has an out-of-line portion, that gets written down. Then you move on to the next element, and so on.
The out-of-line contents will be laid out in traversal order, depth-first traversal of the types.You start by the first type, write the inline portion, then traverse the first element of this type. If this has an out-of-line portion, that gets written down. Then you move on to the next element, and so on.
On Thu, Jan 6, 2022 at 12:55 PM Dave Smith <smit...@google.com> wrote:
- The manifest seems to be the encode_persistent() form of the Component table, which means the first 8 bytes of the file are the metadata, correct? Are there additional bytes here before the header of the table begins?
- The wire format docs indicate that a table contains a header followed by a vector of envelopes. Does the vector also have its own header, or are they one and the same?
- The wire format spec shows an ellipsized ("...") block between the header and envelopes. What is this meant to represent? Shouldn't the vector always follow the header?
Is manifest compilation the only case we have that uses this older wire format?If so, perhaps we should update cmc?