Skip to main content

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 url;
19
20#[cfg(feature = "fakes")]
21pub mod fake;
22#[cfg(feature = "system")]
23pub mod system;
24
25pub use clock::Clock;
26pub use env::Env;
27pub use exit::Exit;
28pub use fs::FileSystem;
29pub use process::{Invocation, Output, ProcessRunner};
30pub use url::repo_key;