11 releases
| 0.2.6 | Mar 29, 2026 |
|---|---|
| 0.2.5 | Mar 26, 2026 |
| 0.2.2 | Feb 28, 2026 |
| 0.1.7 |
|
#35 in #time-series-database
112 downloads per month
Used in 17 crates
(15 directly)
33KB
614 lines
aegis-common
Common types, utilities, and shared functionality for the Aegis Database Platform.
Overview
aegis-common provides the foundational types and utilities used across all Aegis crates. It ensures consistency and reduces code duplication throughout the platform.
Features
- Configuration Management - TOML-based configuration loading and validation
- Error Handling - Unified error types with
thiserror - Common Types - Shared data structures (IDs, timestamps, results)
- Utilities - Hashing (xxHash), checksums (CRC32), UUID generation
Modules
| Module | Description |
|---|---|
config |
Configuration structures and loading |
error |
Common error types and Result aliases |
types |
Shared type definitions (NodeId, BlockId, etc.) |
utils |
Utility functions (hashing, encoding, time) |
Usage
Add to your Cargo.toml:
[dependencies]
aegis-common = { path = "../aegis-common" }
Example
use aegis_common::{AegisError, AegisResult, NodeId};
use aegis_common::config::AegisConfig;
use aegis_common::utils::{generate_id, hash_bytes};
// Generate a unique ID
let id = generate_id();
// Hash some data
let hash = hash_bytes(b"hello world");
// Load configuration
let config = AegisConfig::from_file("aegis.toml")?;
Dependencies
serde/serde_json- Serializationthiserror- Error handlingchrono- Date/time utilitiesuuid- Unique identifier generationxxhash-rust- Fast hashingcrc32fast- Checksum computation
Tests
cargo test -p aegis-common
License
Apache-2.0
Dependencies
~2.2–3.5MB
~67K SLoC