Skip to main content

Module app

Module app 

Source
Expand description

Main host-facing entrypoints, runtime state, and session types. The app module exists to turn the library pieces into a running program.

This is the process-facing layer of the crate. It wires together CLI parsing, config loading, plugin/catalog setup, rendering, and REPL startup into the public App entrypoints. Lower-level modules like crate::config, crate::ui, and crate::repl stay reusable because this module is where the product-level orchestration happens.

Contract:

  • this is allowed to depend on the rest of the crate because it is the host composition layer
  • the dependency should not point the other way; lower-level modules should not import crate::app to get work done

Public API shape:

Structs§

App
Top-level application entrypoint for CLI and REPL execution.
AppBuilder
Builder for configuring an App before construction.
AppClients
Long-lived client registries shared across command execution.
AppClientsBuilder
Builder for AppClients.
AppRunner
Reusable runner that keeps an App paired with a UI sink.
AppRuntime
Runtime-scoped application state shared across commands.
AppSession
Session-scoped REPL state, caches, and prompt metadata.
AppSessionBuilder
Builder for AppSession.
AppState
Aggregate application state shared between runtime and session logic.
AppStateBuilder
Builder for AppState.
AuthState
Authorization and command-visibility state derived from configuration.
BufferedUiSink
Sink that buffers stdout and stderr for assertions and snapshot tests.
ConfigState
Holds the current resolved config plus a monotonic in-memory revision.
DebugTimingBadge
Timing badge rendered in the prompt for the most recent command.
DebugTimingState
Shared prompt-timing storage that dispatch code can update and prompt rendering can read.
LastFailure
Summary of the last failed REPL command.
LaunchContext
Startup inputs used to assemble runtime services and locate on-disk state.
LaunchContextBuilder
Builder for LaunchContext.
ReplScopeFrame
One entered command scope inside the interactive REPL shell stack.
ReplScopeStack
Nested REPL command-scope stack used for shell-style scoped interaction.
RuntimeContext
Startup-time selection inputs that shape runtime config resolution.
StdIoUiSink
Sink that forwards output directly to the process stdio streams.
UiState
Derived presentation/runtime state for the active config snapshot.
UiStateBuilder
Builder for UiState.

Enums§

TerminalKind
Identifies which top-level host surface is currently active.

Traits§

UiSink
Terminal-facing output sink for stdout/stderr emission.

Functions§

run_from
Runs the top-level CLI entrypoint from an argv-like iterator.
run_process
Runs the default application instance and returns a process exit code.
run_process_with_sink
Runs the default application instance with the provided sink.