odx_core/lib.rs
1//! Domain types, exit codes and IO traits shared by the odx crates.
2//!
3//! Library crates in the odx workspace never touch the operating system
4//! directly. They take the traits defined here ([`Clock`], [`Env`],
5//! [`FileSystem`], [`ProcessRunner`]) so that every code path, including
6//! error paths, can be exercised in tests. The binaries construct the real
7//! implementations from `system` (feature `system`); tests use the
8//! in-memory fakes from `fake` (feature `fakes`).
9//!
10//! Traits for git, forges, package indexes and secret storage are added in
11//! the roadmap phases that introduce them.
12
13mod clock;
14mod env;
15mod exit;
16mod fs;
17mod process;
18mod redact;
19mod url;
20
21#[cfg(feature = "fakes")]
22pub mod fake;
23#[cfg(feature = "system")]
24pub mod system;
25
26pub use clock::Clock;
27pub use env::Env;
28pub use exit::Exit;
29pub use fs::FileSystem;
30pub use process::{Invocation, Output, ProcessRunner};
31pub use redact::redact;
32pub use url::repo_key;