Skip to main content

Crate repolith_core

Crate repolith_core 

Source
Expand description

Core types, traits, manifest parser, and plan computation for repolith.

This crate is the foundation of the workspace. It carries no tokio runtime dependency — only lightweight runtime-agnostic combinators from futures (used inside Plan::compute to fan probes out concurrently). The orchestrator + executor live one crate up in repolith-engine, which pulls in tokio. The split lets downstream consumers (CLI, future TUI/LSP, telemetry) pull the lightweight types here without dragging the runtime tree.

§Modules at a glance

  • types — value types: ActionId, Sha256, BuildEvent, Ctx (carries the CancellationToken), BuildError, ExecMode.
  • actiontrait Action: id, deps, input_hash, execute.
  • cachetrait Cache + CacheError. Implementations live in repolith-cache.
  • planPlan::compute (Kahn topological sort + cascading staleness via ChangeReason).
  • manifestManifest::from_toml (parse + validate repolith.toml).

§Typical use

use repolith_core::manifest::Manifest;

let toml = std::fs::read_to_string("repolith.toml")?;
let manifest = Manifest::from_toml(&toml)?;
for id in manifest.action_ids() {
    println!("{id}");
}

Actually executing the plan happens through repolith-engine’s Orchestrator, which consumes the types defined here.

Modules§

action
Action trait — one unit of orchestrated work.
cache
Cache trait + CacheError. Concrete backends live in dependent crates. Cache trait — abstract storage for build events.
manifest
Manifest schema and parser (repolith.toml). Repolith manifest schema and parser.
plan
Layered execution plan with cascading staleness reasons. Build plan — immutable DAG snapshot with staleness reasons.
types
Value types used across the workspace. Fundamental data types for the repolith orchestration engine.