#[repr(u8)]pub enum SectionKind {
Show 18 variants
NameTable = 1,
Variables = 2,
ListDefs = 3,
ListItems = 4,
Externals = 5,
Containers = 6,
LineTables = 7,
Labels = 8,
ListLiterals = 9,
AddressPaths = 10,
LiteralPool = 11,
StructShapes = 12,
EffectRows = 13,
Visibility = 14,
AliasTable = 15,
FrameShapes = 16,
DebugInfo = 17,
LineVariantGroups = 18,
}Expand description
Identifies a section within an .inkb file.
Variants§
NameTable = 1
Variables = 2
ListDefs = 3
ListItems = 4
Externals = 5
Containers = 6
LineTables = 7
Labels = 8
ListLiterals = 9
AddressPaths = 10
LiteralPool = 11
T1b LiteralPool (docs/format-v4-rfc.md §2): content-hash
deduplicated constant values referenced by PushLiteral(idx).
Additive alongside ListLiterals — see the T1b-2 PR description for
why the RFC’s ListLiterals absorption is deferred, not done here.
StructShapes = 12
TM-4 StructShapes (docs/typed-mode-spec.md §6): one entry per
declared STRUCT — shape id, name, ordered field names. Reserved
(count always 0) through 4.0; this PR lands the section’s real
encoding at the format layer only — nothing in the compiler emits a
non-empty table yet (see the PR description’s scope note).
EffectRows = 13
T2-3 EffectRows (docs/effects-spec.md §11, docs/format-v4-rfc.md
§2): the DefinitionId → row table of factored effect rows — one per
knot/stitch (the resume-scheduling estimate, §12.1). Section-locally
versioned (one prefix byte) so the row encoding can grow without a
format-wide bump — the reservation this graduates was made for exactly
this, so no VERSION bump accompanies it. Always present (possibly
empty). Was reserved (count-0) through v5; this slice lands the real
encoding and first emission (rows are inert metadata the runtime
does not yet read).
Visibility = 14
M-2b Visibility (docs/modules-spec.md §4, docs/format-spec.md):
the DefinitionIds of every #@private definition, sorted ascending.
Omitted entirely when empty (the common all-public case), so
public-only stories stay byte-identical for that section — the
section is purely additive and self-framed in the offset table.
0x0D is claimed by EffectRows, so this takes the next free tag.
AliasTable = 15
M-3 AliasTable (docs/modules-spec.md §5): old→new DefinitionId
rename records from #@was(old_name) directives. Section-locally
versioned (one prefix byte) so the row encoding can grow without a
format-wide bump. Always present (possibly empty) from v5 onward.
0x0E was claimed by Visibility (M-2b), so this takes the next
free tag.
FrameShapes = 16
FS-3 FrameShapes (docs/flow-suspension-spec.md §4/§11): one
name-keyed frame shape per await site — the static crossing-locals
description the runtime spills/restores around a park.
Section-locally versioned (one prefix byte) so the shape encoding can
grow without a format-wide bump. Omitted entirely when empty (the
common case — and, behind the E052 fence, the only case today, since
no await compiles yet), so all existing stories stay byte-identical
and no VERSION bump is needed. 0x0F was claimed by AliasTable, so
this takes the next free tag.
DebugInfo = 17
D6 DebugInfo (docs/debugger-spec.md §2, issue #3184): the
bytecode-offset → source-range map, plus its section-local file
table. Section-locally versioned (one prefix byte) so the entry
encoding can grow (e.g. the reserved NodeId column, §1.3) without a
format-wide bump. Omitted entirely when not requested — the
ship-policy default (§1.2): a release-exported story never carries
this section, so every existing story stays byte-identical and no
VERSION bump is needed. 0x10 was claimed by FrameShapes, so
this takes the next free tag — the test this graduates,
from_u8_rejects_unclaimed_section_tag, is updated alongside this
variant (not deleted) to pin the new next-free tag (0x12).
LineVariantGroups = 18
Stage 1 of the shared-alternatives track (issue #3273,
docs/decision-log.md 2026-08-29): crate::LineVariantGroup
records tying runs of consecutive line-table entries back to one
authored line whose inline alternatives were enumerated at
recognition time. Section-locally versioned (one prefix byte) so the
record encoding can grow without a format-wide bump. Omitted
entirely when empty — nothing emits a non-empty table until the
stage-2 flip (#3274), so every existing story stays byte-identical
and no VERSION bump is needed. 0x11 is claimed by DebugInfo,
so this takes the next free tag.
Trait Implementations§
Source§impl Clone for SectionKind
impl Clone for SectionKind
Source§fn clone(&self) -> SectionKind
fn clone(&self) -> SectionKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more