Skip to main content

void_core/
lib.rs

1//! void-core: Anonymous encrypted source control
2//!
3//! This crate provides the core functionality for void:
4//! - Encryption (AES-256-GCM)
5//! - Content-addressed storage (CIDs)
6//! - Shard-based file storage
7//! - Metadata and commit management
8
9#![warn(clippy::all)]
10
11// == Layer 0: Support (foundational utilities) ==
12pub mod support;
13
14// Re-export support utilities at crate level for convenience
15pub use support::{cid, config, error, lock, pathspec, util};
16pub use support::hash::ContentHash;
17
18/// File content extracted from a shard via manifest-driven access.
19pub type FileContent = Vec<u8>;
20pub use support::{Result, VoidCid, VoidContext, VoidError};
21
22// == Layer 1: Storage (crypto, shard, store) ==
23pub mod crypto;
24pub mod shard;
25pub mod store;
26
27// == Layer 2: Data models ==
28pub mod index; // Original module (backwards compatibility)
29pub mod metadata; // Original module (backwards compatibility)
30pub mod refs; // Original module (backwards compatibility)
31pub mod staged; // Staged content store (git-like staging semantics)
32pub mod stash;
33
34// == Layer 3: Diff engine ==
35pub mod diff;
36
37// == Layer 4: Pipeline (seal/unseal) ==
38pub mod pipeline;
39
40// == Layer 5: Operations (fsck, merge, diagnostics) ==
41pub mod ops;
42
43// == Layer 5b: Repository analysis ==
44pub mod repo;
45
46// == Layer 6: Workspace (checkout, stage) ==
47pub mod workspace;
48
49// Re-export workspace operations at crate level
50pub use workspace::{checkout, move_path, remove, reset, stage, status};
51
52// == Layer 7: Transport (ipfs, manifest, car) ==
53pub mod transport;
54
55// == Layer 8: Collaboration (identity, manifest, ecies, pin, seed) ==
56pub mod collab;
57
58// Re-export important types from collab layer
59pub use collab::{Identity, IdentityError};