Expand description
Core command entry API for the SIM bootloader.
§Pre-publish 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 – but until the constellation is published there is no default codec
to load.
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.
Structs§
- 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.
- Crates
IoResolver - crates.io-style artifact resolver owned by the CLI layer.
- Crates
IoSpec - A parsed
crates.io:NAME@REQsource. - Load
Receipt - Receipt for one library loaded by the bootloader.
- Load
Session - Kernel-backed loader session used by the command entry API.
- Payload
- Payload preserved for loaded-lib behavior.
- Resolved
Crates IoSource - A crates.io source resolved to a local artifact path.
- Version
Req - Version requirement syntax accepted by the CLI crates.io resolver.
Enums§
- CliCommand
- Top-level command selected by the bootloader parser.
- LibSource
Spec - Library source syntax accepted by the command line.
- Load
Receipt Role - The role a loaded library serves in a boot session.
Constants§
- CLI_
MAIN_ ENTRYPOINT - Symbol prefix a loaded lib claims to own command-line execution.
- DEFAULT_
CODEC_ NAME - Codec name used when
--codecis omitted.
Functions§
- boot_
codec_ name - Returns the selected codec name for a boot session.
- 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.
- parse_
args - Parses the minimal bootloader flags.
- run
- Runs the command entry API with process arguments.
- run_
command_ with_ session - Runs an already-parsed command with an injected loader session.
- run_
with_ session - Runs the command entry API with an injected loader session.
- version_
line - Returns the version line printed by
sim --version.