buildl-core 0.3.0

Domain data, ports, and pure pipeline logic for the buildl build system — no I/O, no Lua.
Documentation
//! The ports: the traits through which this crate reaches everything outside itself.
//!
//! Its own directory because the crate's defining property is that it names no I/O API. Every
//! capability this crate needs from the outside world arrives as an implementation of a trait
//! declared here, supplied by a caller, rather than through a direct call to an I/O API. Every
//! trait of the crate lives here, the bundle included, so no logic module declares one.
//!
//! Responsibilities:
//!
//! - [`Clock`] — reading the host wall clock.
//! - [`DeclarationSource`] — evaluating one build file.
//! - [`Manifest`] — what a workspace's manifest says.
//! - [`Host`] — the platform actions run on, and the values of environment variables.
//! - [`Digester`] — a file's metadata and content digest.
//! - [`StatCache`] — the digests of files already hashed.
//! - [`ToolResolver`] — what identifies the program a command names.
//! - [`ActionCache`] — what a build recorded for a target, read and written.
//! - [`ContentStore`] — what actions produce, held by content and placed in the workspace.
//! - [`EventLog`] — the record of how each target of a build ended.
//! - [`RunHistory`] — the lines of the build log, read back.
//! - [`Sweep`] — what the content store holds, listed and removed.
//! - [`ExecStrategy`] — running one action in a directory of its own.
//! - [`Dispatcher`] — having several tasks worked on at once.
//! - [`GraphRecord`] — the graph a build resolved, kept where a later reader finds it.
//! - [`Reporter`] — showing a person what a build is doing.
//! - [`Approver`] — saying whether a build may do what it wants.
//! - [`RemoteCache`] — a cache of results shared between machines, asked and filled by the action
//!   that made them; [`BlobSource`] — where the bytes an upload names are read from;
//!   [`NoRemote`] — the remote cache of a build that has none.
//! - [`IgnoreRules`] — whether a workspace path is ignored by a `.buildlignore`;
//!   [`NothingIgnored`] — the rules of a build that has none.
//! - [`Changes`] — the files that changed in the workspace, one debounced batch at a time.
//! - [`Cycles`] — one build, and one load of the build files, on the workspace opened again.
//! - [`WatchReport`] — what a watching loop tells a person: building, failed, waiting.
//! - [`Ports`] — the bundle naming one implementation of each port, so a pipeline takes one type
//!   parameter instead of one per port.
//! - [`PortSet`] — one instance of each port a bundle names, so a pipeline is built from one
//!   value.
//!
//! Non-responsibilities: production implementations. A real implementation does I/O, so it lives
//! in an adapter crate; the only implementations in this crate are test fakes.
//!
//! This file holds only module declarations and re-exports, so it carries no logic to unit-test.

pub mod action_cache;
pub mod approver;
pub mod bundle;
pub mod changes;
pub mod clock;
pub mod content_store;
pub mod cycles;
pub mod declaration_source;
pub mod digester;
pub mod dispatcher;
pub mod event_log;
pub mod exec_strategy;
pub mod graph_record;
pub mod host;
pub mod ignore_rules;
pub mod manifest;
pub mod no_remote;
pub mod nothing_ignored;
pub mod port_set;
pub mod remote_cache;
pub mod reporter;
pub mod run_history;
pub mod stat_cache;
pub mod sweep;
pub mod tool_resolver;
#[cfg(test)]
pub(crate) mod two_machines;
pub mod watch_report;

pub use action_cache::ActionCache;
pub use approver::Approver;
pub use bundle::Ports;
pub use changes::Changes;
pub use clock::Clock;
pub use content_store::ContentStore;
pub use cycles::Cycles;
pub use declaration_source::DeclarationSource;
pub use digester::Digester;
pub use dispatcher::Dispatcher;
pub use event_log::EventLog;
pub use exec_strategy::ExecStrategy;
pub use graph_record::GraphRecord;
pub use host::Host;
pub use ignore_rules::IgnoreRules;
pub use manifest::Manifest;
pub use no_remote::NoRemote;
pub use nothing_ignored::NothingIgnored;
pub use port_set::PortSet;
pub use remote_cache::{BlobSource, RemoteCache};
pub use reporter::Reporter;
pub use run_history::RunHistory;
pub use stat_cache::StatCache;
pub use sweep::Sweep;
pub use tool_resolver::ToolResolver;
pub use watch_report::WatchReport;