Skip to main content

mbx/
lib.rs

1//! mbx: a build cache for Rust projects.
2//!
3//! Compilations are cached as individual rustc actions in a content-addressed
4//! store shared by every project and worktree on a machine, and optionally
5//! shared further through a remote cache.
6//!
7//! This library target exists so the executable and integration tests can
8//! share application code; it is not an embedding API. The supported
9//! interfaces are the `mbx` command line -- its subcommands and its versioned
10//! JSON output -- and, for anything speaking to a remote cache,
11//! `mbx-cache-protocol`. `mbx-cache-core` and `mbx-cache-rustc` are internals
12//! too, and say so in their own descriptions.
13//!
14//! Nothing here carries a compatibility guarantee, and CI's public-API check
15//! skips this package for that reason -- see `UNCHECKED_PACKAGES` in
16//! `.github/workflows/ci.yml`. Types the CLI alone reads may gain fields in a
17//! patch release. Do not restore the check to "protect" these items: it would
18//! only force a major bump every time the CLI gains a setting.
19//!
20//! The modules below are `#[doc(hidden)]` for the same reason. They have to
21//! stay `pub` for the binary and the integration tests, but a published crate
22//! whose documentation advertises `store` and `session` invites exactly the
23//! dependency the paragraph above rules out.
24
25#[cfg(target_os = "linux")]
26mod cgroup;
27#[doc(hidden)]
28pub mod cli;
29#[doc(hidden)]
30pub mod config;
31#[doc(hidden)]
32pub mod doctor;
33pub(crate) mod events;
34#[doc(hidden)]
35pub mod explain;
36#[doc(hidden)]
37pub mod logging;
38pub mod phase_timing;
39#[doc(hidden)]
40pub mod policy;
41pub mod remote;
42pub(crate) mod savings;
43#[doc(hidden)]
44pub mod session;
45pub(crate) mod stats;
46#[doc(hidden)]
47pub mod store;
48#[doc(hidden)]
49pub mod target;
50mod target_seed;
51mod target_units;
52#[doc(hidden)]
53pub mod tui;
54#[doc(hidden)]
55pub mod util;
56
57mod analyze;
58mod ar;
59mod build_script;
60mod cc;
61mod digest_ledger;
62mod incremental;
63mod linker;
64mod managed_linker;
65mod materialize;
66mod out_dir;
67mod pressure;
68mod rustc;
69mod rustdoc;
70mod scheduler;
71mod storage;
72#[doc(hidden)]
73pub mod supervision;
74mod unit_graph;
75mod workspace_state;