aegis-common

Crates.ioaegis-common
lib.rsaegis-common
version0.1.7
created_at2026-01-20 02:30:08.220123+00
updated_at2026-01-24 03:48:45.725303+00
descriptionCommon types and utilities for Aegis database
homepagehttps://automatanexus.com
repositoryhttps://github.com/AutomataNexus/Aegis-DB
max_upload_size
id2055675
size49,885
Andrew Jewell Sr. (AutomataControls)

documentation

README

AegisDB Logo

aegis-common

License Rust Version AegisDB

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 - Serialization
  • thiserror - Error handling
  • chrono - Date/time utilities
  • uuid - Unique identifier generation
  • xxhash-rust - Fast hashing
  • crc32fast - Checksum computation

Tests

cargo test -p aegis-common

License

Apache-2.0

Commit count: 0

cargo fmt