Skip to main content

Crate sim_run_core

Crate sim_run_core 

Source
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 via LoadSession::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_factory and driven via run_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.
CratesIoResolver
crates.io-style artifact resolver owned by the CLI layer.
CratesIoSpec
A parsed crates.io:NAME@REQ source.
LoadReceipt
Receipt for one library loaded by the bootloader.
LoadSession
Kernel-backed loader session used by the command entry API.
Payload
Payload preserved for loaded-lib behavior.
ResolvedCratesIoSource
A crates.io source resolved to a local artifact path.
VersionReq
Version requirement syntax accepted by the CLI crates.io resolver.

Enums§

CliCommand
Top-level command selected by the bootloader parser.
LibSourceSpec
Library source syntax accepted by the command line.
LoadReceiptRole
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 --codec is omitted.

Functions§

boot_codec_name
Returns the selected codec name for a boot session.
cli_main_entrypoint_symbol
Builds the qualified cli/main/NAME entrypoint 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.