Expand description
Core command entry API for the SIM bootloader.
§Bootloader frame
The shipped sim binary is a bootloader frame, not a batteries-included
runtime. run builds a LoadSession whose only registered loader is
the in-process LoadSession::add_host_factory host loader: with no host
factory and no injected artifact loader it can boot no codec and no
library, so run(["sim", "run"]) fails with no codec 'lisp' available.
This is by design: behavior lives in loadable libraries, not baked into the
frame. The default frame loads a codec when an explicit source, cache
artifact, registry resolver, or host factory supplies it.
A working session therefore comes from one of:
- an explicitly provided source:
--load path/to/artifact.simlib(needs an artifact loader registered viaLoadSession::with_loader), or - a seeded cache resolved by the cache-only
CratesIoResolver(it never reaches the network unless an explicit registry resolver is installed; the cache must otherwise already hold the artifact), or - a host factory registered through
LoadSession::with_host_factoryand driven viarun_with_session– the path every functional test uses.
The registry feature adds a git registry artifact resolver, but it is active
only when the host installs it. Nothing here bakes in a codec.
Modules§
- device_
options - Reusable route option models for device product verbs.
Structs§
- Adapter
Tick - One scheduled adapter-loop tick.
- Bootloader
- A thin bootloader over
LoadSessionfor a single-library product binary. - CliBoot
- Parsed bootloader controls and payload data.
- CliEntrypoint
- A loaded function that owns command-line execution.
- CliEnvelope
- Data envelope supplied to the selected loaded-lib entrypoint.
- CliError
- Command-line error returned by the bootloader core.
- Config
Load Options - Source-selection options for runtime configuration discovery.
- Config
Report Request - Request selected by the
sim config ...CLI surface. - Config
Source Report - One config source and its discovery status.
- Crates
IoResolver - crates.io-style artifact resolver owned by the CLI layer.
- Crates
IoSpec - A parsed
crates.io:NAME@REQsource. - Device
Adapter Loop Plan - Pacing plan for a composed device adapter loop.
- Device
Edge Session - Composed device host session returned to per-device verbs.
- Device
Host Spec - Input required to compose a device host session.
- Device
Placement - Placement plan for a device surface encoder and adapter pair.
- Device
Profile - Stream-facing profile advertised by a composed device route.
- Device
Site - Export-record-style descriptor for a device route site.
- Device
Surface HubJoin - Surface-hub join plan produced by device host composition.
- Load
Receipt - Receipt for one library loaded by the bootloader.
- Load
Session - Kernel-backed loader session used by the command entry API.
- Loaded
LibReport - One loaded library as it appears in a boot session report.
- Loaded
State Report - Loaded-state report built from one
LoadSession. - Payload
- Payload preserved for loaded-lib behavior.
- Resolved
Crates IoSource - A crates.io source resolved to a local artifact path.
- Route
Arg - Route selected by a product verb before device host composition.
- Runtime
Config State - Configuration layers discovered during a boot session.
- Stub
Provider - Hardware-free provider used when no concrete device provider is installed.
- Stub
Session - Hardware-free session used by headless device composition.
- Version
Req - Version requirement syntax accepted by the CLI crates.io resolver.
Enums§
- CliCommand
- Top-level command selected by the bootloader parser.
- Config
Report Kind - Config report variants supported by the bootloader.
- Device
Consent Policy - Consent policy carried by device verbs into host composition.
- Device
Host Stale Policy - Policy applied when a device sample or rendered frame becomes stale.
- Device
Placement Error - Device placement validation error.
- Device
Provider Kind - Provider source selected during device host composition.
- Device
Rate Class - Coarse rate class for pacing the device adapter loop.
- Device
Site Locality - Placement locality advertised by a device site.
- LibSource
Spec - Library source syntax accepted by the command line.
- Load
Receipt Role - The role a loaded library serves in a boot session.
- Source
Status - Discovery status for one config source.
Constants§
- CLI_
MAIN_ ENTRYPOINT - Symbol prefix a loaded lib claims to own command-line execution.
- DEFAULT_
CODEC_ NAME - Codec name used when
--codecis omitted.
Traits§
- Device
Provider - Provider that opens one composed device session.
- Device
Session - Open device session used by a composed route.
Functions§
- boot_
codec_ name - Returns the selected codec name for a boot session.
- cli_
envelope_ args - Extracts the UTF-8 payload arguments from a generic CLI envelope value.
- cli_
main_ entrypoint_ symbol - Builds the qualified
cli/main/NAMEentrypoint symbol for a named lib. - codec_
lib_ symbol - Returns the library symbol for a codec name.
- compose_
device_ host - Composes a device host session using a hardware-free stub provider.
- compose_
device_ host_ with_ provider - Composes a device host session using a supplied provider instance.
- derive_
device_ rate_ class - Derives the adapter-loop rate class from stream-facing device metadata.
- format_
config_ sources - Renders a text config-source report.
- format_
config_ sources_ json - Renders a stable JSON config-source report.
- format_
config_ status - Renders a text status report.
- format_
config_ status_ json - Renders a stable JSON status report.
- format_
effective_ config - Renders one effective config table as config text.
- format_
effective_ config_ json - Renders one effective config table as stable JSON.
- install_
device_ bases - Installs the base device boot requirements into an existing context.
- load_
config_ sources - Loads config layers from files and site exports.
- load_
config_ sources_ with_ probes - Loads config layers from probes, files, and site exports.
- parse_
args - Parses the minimal bootloader flags.
- render_
config_ report - Renders the selected config report.
- run
- Runs the command entry API with process arguments.
- run_
command_ with_ session - Runs an already-parsed command with an injected loader session.
- run_
config_ probe - Executes one config probe, applying any emitted layer and recording its report.
- run_
with_ session - Runs the command entry API with an injected loader session.
- version_
line - Returns the version line printed by
sim --version.