pub type VmBuiltinDef = BuiltinDef<VmBuiltinHandler>;Expand description
BuiltinDef specialized to the VM’s handler type.
Aliased Type§
pub struct VmBuiltinDef {
pub sig: BuiltinSignature,
pub aliases: &'static [&'static str],
pub handler: VmBuiltinHandler,
pub category: Option<&'static str>,
pub doc: Option<&'static str>,
pub parser_only: bool,
pub runtime_only: bool,
}Fields§
§sig: BuiltinSignatureStatic signature consumed by the parser/typechecker.
aliases: &'static [&'static str]Additional names that share this impl + signature. Each alias gets
its own BuiltinSignature entry at install time (with the same
param/return types) so the typechecker accepts both.
handler: VmBuiltinHandlerRuntime handler (sync fn, async fn, or None for parser-only
builtins). Type is opaque to this crate.
category: Option<&'static str>Free-form category label used for metadata/observability.
doc: Option<&'static str>Human-readable doc, typically the leading /// block from the impl
function. Surfaced to LSP hover and harn explain.
parser_only: boolSet to true for builtins that exist in the parser registry but
have no runtime entry (len, split, … — see
PARSER_ONLY_EXCEPTIONS in the alignment test). The registry
skips runtime registration for these.
runtime_only: boolSet to true for compiler-synthesized runtime helpers (sigil
prefix __, opcode keywords, enum constructors) that exist as VM
builtins but should NOT show up in the parser signature table.
The registry skips signature publishing for these.