Class: Kobako::Snippet::Binary
- Inherits:
-
Object
- Object
- Kobako::Snippet::Binary
- Defined in:
- lib/kobako/snippet/binary.rb
Overview
Kobako::Snippet::Binary — value object representing a single #preload(binary:) entry held by Kobako::Snippet::Table (docs/behavior.md B-32).
The body is RITE bytecode (as emitted by mrbc) carried as an ASCII_8BIT String so msgpack-ruby encodes it as bin family on the wire (docs/wire-codec.md Invocation channels). The host treats the bytes as opaque — the snippet’s canonical name, when present, lives in the bytecode’s embedded debug_info and is resolved by the guest at load time; structural validation (docs/behavior.md E-37 / E-38) is deferred to the first invocation’s guest replay.
The class is a Data.define subclass — frozen and value-equal. Callers (chiefly Table) construct instances via keyword form Binary.new(body: …). Wire-form construction is the Table‘s responsibility.
Constant Summary collapse
- KIND =
The
kindfield value carried by bytecode snippets in their Frame 3 wire envelope entry (docs/wire-codec.md Invocation channels). "bytecode"