observer-rust-host 0.1.1

Rust provider host for the Observer verification platform
Documentation

observer-rust-host

observer-rust-host turns an observer-rust registry into the standard Observer provider host protocol.

It is the crate to use when you already have Rust test registrations and need to expose them over Observer's list and run boundary with deterministic JSON payloads.

What It Provides

  • run_cli and run_cli_from for a ready-made provider-host command-line interface
  • list_payload for stable provider discovery output
  • run_payload for base64-encoded run results and telemetry
  • panic capture and timeout-based execution flow for registered tests
  • provider-run telemetry such as wall time, CPU time, and peak RSS when available

Typical Shape

use observer_rust_host::run_cli;

fn main() {
    if let Err(error) = run_cli::<MyRegistry>("rust") {
        eprintln!("{error}");
        std::process::exit(2);
    }
}

That host will expose:

  • list for deterministic discovery
  • run --target <target> --timeout-ms <ms> for executing one registered test

Payload Model

The host emits JSON payloads designed for Observer provider resolution:

  • ListPayload contains the provider name and the sorted test set
  • RunPayload contains exit status, stdout/stderr as base64, and optional telemetry

Telemetry emitted by the test itself is preserved, and host-side timing/resource telemetry is appended when available.

When To Use This Crate

Use observer-rust-host if you want the standardized host boundary but do not want to hand-write the transport yourself.

Use observer-rust directly if you are building a different transport or embedding the execution layer somewhere else.