Skip to main content

Crate rtb_update

Crate rtb_update 

Source
Expand description

Self-update subsystem for tools built on RTB.

§What this crate is

A composition of three standards-grade primitives:

  • rtb_forge — fetches release metadata and streams asset bytes.
  • ed25519-dalek — verifies the vendor’s detached signature.
  • self-replace — atomically swaps the running binary.

The contribution is the flow: selection, download, verification, swap, report, rollback. Every step is a point at which a failure must be survivable — the binary on disk must remain either the old version or the fully-verified new one, never anything in between.

See docs/development/specs/2026-04-23-rtb-update-v0.1.md for the full contract.

Re-exports§

pub use error::UpdateError;
pub use options::CheckOutcome;
pub use options::ProgressEvent;
pub use options::ProgressSink;
pub use options::RunOptions;
pub use options::RunOutcome;
pub use policy::evaluate as evaluate_update_policy;
pub use policy::PolicyDecision;
pub use policy::UpdateState;
pub use updater::Updater;
pub use updater::UpdaterBuilder;

Modules§

asset
Asset selection for the running host.
command
update CLI subcommand — check | run.
error
The UpdateError enum.
flow
The 10-step self-update flow. Pure functions + small helpers the crate::Updater composes.
options
Value types that flow into and out of crate::Updater.
policy
Self-update policy — synchronous, throttled pre-run update checks.
prerun
Pre-run self-update hook.
updater
The Updater — composed over rtb-forge providing release discovery and over self-replace for the atomic-swap step. See crate::flow for the step-by-step atomic-swap sequence.
verify
Cryptographic verification: Ed25519 detached signatures and SHA-256 checksums.

Enums§

UpdatePolicy
Author-set baseline for synchronous, pre-run self-update checks.