pub enum LibTarget {
Native,
WasmComponent,
CodecSource(Symbol),
DataOnly,
HostRegistered,
}Expand description
The kind of artifact a library is loaded from.
Every variant is codec-agnostic: the kernel never names a concrete codec.
A library defined by decoding source through some codec is
LibTarget::CodecSource, carrying that codec’s Symbol as open data,
so a new source dialect is expressible without editing this enum.
Variants§
Native
A native Rust library linked into the host.
WasmComponent
A Wasm component loaded through the ABI transport.
CodecSource(Symbol)
A library defined by source decoded through the named codec (open data,
e.g. the symbol codec/lisp).
DataOnly
A library that contributes only data exports, no executable behavior.
HostRegistered
A library registered directly by the host (trusted).
Implementations§
Source§impl LibTarget
impl LibTarget
Sourcepub fn to_symbol(&self) -> Symbol
pub fn to_symbol(&self) -> Symbol
Renders the target as its stable serialized Symbol.
The closed variants serialize to unqualified tags (native,
wasm-component, data-only, host-registered); a
LibTarget::CodecSource serializes to its codec symbol verbatim
(e.g. codec/lisp), keeping the codec identity as open data rather than
a closed kernel string.
Sourcepub fn from_symbol(symbol: &Symbol) -> Self
pub fn from_symbol(symbol: &Symbol) -> Self
Reconstructs a target from its serialized Symbol.
The unqualified closed tags map to their variants. The legacy
lisp-source tag is accepted for backward compatibility and decodes to
CodecSource(codec/lisp) so existing serialized manifests still load.
Any other symbol is treated as an open LibTarget::CodecSource.