Skip to main content

SOME_BINDING_MARKER

Constant SOME_BINDING_MARKER 

Source
pub const SOME_BINDING_MARKER: &str = "\u{0}some";
Expand description

WebAssembly code generation from VM bytecode: the shared byte emitter (wasm::encode + wasm::func, always built) plus the WS6 browser WASM-JIT tier (wasm::region_jit, behind the wasm-jit feature). The direct AOT backend (largo build --emit wasm) consumes the same emitter. The “field name” a Some arm’s binding carries, in place of a real field.

LOGOS encodes Options transparently — some x IS x — so a Some arm binds the WHOLE matched value rather than one of its fields. A struct arm and a Some arm reach BindArm looking identical otherwise, and guessing between them (by binding index, say) silently changes what a real struct arm does. A marker no identifier can spell tells them apart exactly.