caixa_resolver/lib.rs
1//! `caixa-resolver` — git-only dependency resolver.
2//!
3//! **Store model, Zig-style.** A caixa is a Git repo whose root has a
4//! `caixa.lisp`. There is no central registry: `feira` publishes by pushing
5//! a Git tag, and other caixas consume it via `:fonte (:tipo git …)` or by
6//! shorthand `(:nome "x")`, which the resolver expands to the configured
7//! default host (`github:pleme-io/<nome>` by default).
8//!
9//! Resolution flow:
10//! 1. Expand default sources using [`ResolverConfig`].
11//! 2. For each dep, clone-or-fetch into the cache, check out the pinned
12//! `:rev` / `:tag` / `:branch`, read its `caixa.lisp`.
13//! 3. BFS transitive deps; stop when every node is resolved.
14//! 4. Build `LacreEntry` list with BLAKE3 `:conteudo` (git object id
15//! prefixed with `git:`) and `:fechamento` (hash of content + sorted
16//! transitive closure fechamentos).
17
18extern crate self as caixa_resolver;
19
20pub mod cache;
21pub mod config;
22pub mod git;
23pub mod lisp_config;
24pub mod resolve;
25pub mod url;
26
27pub use cache::CacheDir;
28pub use config::ResolverConfig;
29pub use lisp_config::ResolverConfigLisp;
30pub use resolve::{ResolveError, resolve_lacre};
31pub use url::expand_shorthand;