Skip to main content

void_core/support/
mod.rs

1//! Cross-cutting support utilities
2//!
3//! Foundational types and utilities used throughout void-core.
4
5pub mod cid;
6pub mod config;
7pub mod error;
8pub mod events;
9pub mod hash;
10pub mod lock;
11pub mod parse;
12pub mod pathspec;
13pub mod util;
14pub mod void_context;
15
16// Re-export error types (most important - used everywhere)
17pub use error::{Result, VoidError};
18
19
20// Re-export VoidContext and subsystem types
21pub use void_context::{CryptoContext, NetworkConfig, RepoPaths, RepoMeta, SealConfig, VoidContext};
22
23// Re-export cid types and functions
24pub use cid::{create as cid_create, from_bytes, parse, to_bytes, to_string, ToVoidCid, VoidCid};
25
26// Re-export config types and functions
27pub use config::{
28    get as config_get, list as config_list, load as config_load, save as config_save,
29    set as config_set, unset as config_unset, Config, CoreConfig, IpfsConfig, RemoteConfig,
30    TorConfig, TorHiddenServiceConfig, TorKuboConfig, UserConfig,
31};
32
33// Re-export lock types
34pub use lock::{RepoLock, StaleLockInfo};
35
36// Re-export pathspec types
37pub use pathspec::{matches_glob, Pathspec};
38
39// Re-export parse utilities
40pub use parse::parse_padding_strategy;
41
42// Re-export util functions
43pub use util::{
44    atomic_write, atomic_write_str, cbor_to_vec, configure_walker, count_lines, open_store,
45    safe_join, sha256, to_utf8,
46};
47
48// Re-export event types
49pub use events::{
50    emit, emit_ops, emit_workspace, FetchSource, IssueSeverity, MultiObserver, NullObserver,
51    OpsEvent, P2PEvent, PipelineEvent, VoidEvent, VoidObserver, WorkspaceEvent,
52};