| Crates.io | harmonia-store-core |
| lib.rs | harmonia-store-core |
| version | 0.0.0-alpha.0 |
| created_at | 2026-01-23 17:57:11.511168+00 |
| updated_at | 2026-01-23 17:57:11.511168+00 |
| description | Core Nix store semantics - pure types and validation logic |
| homepage | https://github.com/nix-community/harmonia |
| repository | https://github.com/nix-community/harmonia.git |
| max_upload_size | |
| id | 2065165 |
| size | 232,335 |
Purpose: Pure store semantics for Nix, agnostic to I/O and implementation strategy.
This crate provides the fundamental types and pure computation logic for working with the Nix store. It is intentionally I/O-free - all operations are pure functions that operate on values, enabling easy testing and composition.
This is the "business logic" of Nix, pure and simple. It should be usable with a wide variety of implementation strategies, not forcing any decisions. It should also be widely usable by other tools which need to engage with Nix (e.g. tools that create dynamic derivations from other build systems' build plans).
store_path/ - Store path parsing, validation, manipulationderivation/ - Derivation (.drv) file format and semanticsderived_path/ - Paths derived from derivations (built outputs)signature/ - Cryptographic signatures for store pathsrealisation/ - Store path realisation trackingplaceholder/ - Placeholder computation for derivation inputslog/ - Build log typesasync, no filesystem access, no networkuse harmonia_store_core::store_path::{StorePath, StoreDir};
use harmonia_store_core::derivation::Derivation;
// Pure computation - no IO
pub fn parse_store_path(path: &str) -> Result<StorePath, ParseError>;
pub fn compute_hash(content: &[u8], hash_type: HashType) -> Hash;
pub fn verify_signature(path: &StorePath, sig: &Signature) -> bool;
test: Enables proptest Arbitrary implementations for property-based testing