Skip to main content

run_main

Function run_main 

Source
pub fn run_main(registry: PluginRegistry) -> ExitCode
Expand description

Entry point for a custom faucet binary that bundles third-party connectors.

A custom-CLI author writes a tiny main.rs that builds a PluginRegistry with their connectors registered on top of the built-ins and hands it here:

use faucet_cli::registry::PluginRegistry;
fn main() -> std::process::ExitCode {
    faucet_cli::run_main(PluginRegistry::with_builtins())
}

This installs registry as the process-global connector registry (so every command — run, validate, schema, list, preview, serve, … — sees the custom connectors), parses argv, installs the tracing subscriber, and dispatches. The return value is the process exit code (the failed-probe / failed-case / failed-unit count for doctor / test / backfill, 1 for any other error, 0 on success). The stock faucet binary calls this with PluginRegistry::with_builtins().