git_policy_cli/foundation/mod.rs
1//! What:
2//! Small shared building blocks:
3//! private files,
4//! scratch locations,
5//! JSON,
6//! time,
7//! random ids,
8//! paths and bounded parallelism.
9//! Why:
10//! Subsystems depend on these and they depend on no subsystem.
11//!
12//! In TS you'd write (pseudocode):
13//! ```ts
14//! // foundation/index.ts: one `export * from './file'` per module below.
15//! ```
16
17/// Private,
18/// crash-safe file primitives shared by every durable record.
19pub mod private_storage;
20
21/// Where short-lived private files live:
22/// the per-user scratch directory and the repository scratch directory,
23/// never the system temporary directory.
24pub mod scratch_location;
25
26/// Compact JSON records read and written with the incumbent's `JSON` semantics.
27pub mod json_record;
28
29/// Random identifiers in the layout of the incumbent's `randomUUID`.
30pub mod random_id;
31
32/// Text operations with the exact semantics of JavaScript's built-ins.
33pub mod js_text;
34
35/// Line-oriented debug and warning diagnostics on standard error.
36pub mod diagnostic_log;
37
38/// UTC timestamps in the exact form of JavaScript's `toISOString`.
39pub mod iso_time;
40
41/// Lexical path normalization.
42pub mod lexical_path;
43
44/// How many workers independent items may use together, from the CPUs allowed, the memory free and a measured ceiling.
45pub mod parallel_budget;
46
47/// Independent items on a bounded number of threads, reported in input order with no lock.
48pub mod parallel_runner;