Skip to main content

Crate sui_store

Crate sui_store 

Source
Expand description

Nix store abstraction with SeaORM metadata.

Provides the Store trait that all store backends implement (local filesystem, binary cache over HTTP). Includes SeaORM entity models that map 1:1 to the Nix SQLite schema.

§Architecture

  • Store — async trait defining the store contract (query, add, GC)
  • LocalStore — reads /nix/store + SQLite via SeaORM
  • BinaryCacheStore — read-only HTTP client for cache.nixos.org / Cachix / Attic
  • HttpClient — pluggable HTTP backend for testability

§Error handling

All store operations return StoreResult<T>, which wraps StoreError. Binary cache operations produce BinaryCacheError internally, which converts into StoreError via From impls.

Re-exports§

pub use binary_cache::BinaryCacheError;
pub use binary_cache::BinaryCacheStore;
pub use binary_cache::BinaryCacheStoreBuilder;
pub use http::HttpClient;
pub use http::HttpError;
pub use http::HttpResponse;
pub use http::ReqwestHttpClient;
pub use local::LocalStore;
pub use local::LocalStoreMode;
pub use nar::decompress_nar;
pub use profile::Generation;
pub use profile::ProfileError;
pub use profile::ProfileManager;
pub use substitute::SubstituteResult;
pub use substitute::Substitutor;
pub use local::find_gc_roots;
pub use convergence::ConvergenceStore;
pub use convergence::DefaultConvergenceStore;
pub use convergence::GenerationalPath;
pub use convergence::ImpactReport;
pub use traits::CorruptPath;
pub use traits::GcOptions;
pub use traits::GcResult;
pub use traits::OptimiseResult;
pub use traits::PathInfo;
pub use traits::Store;
pub use traits::StoreError;
pub use traits::StoreResult;
pub use traits::VerifyResult;

Modules§

binary_cache
Binary cache store — HTTP client for cache.nixos.org, Cachix, Attic.
convergence
Convergence store extensions.
entity
SeaORM entities for Nix store metadata.
http
HTTP client abstraction for binary cache access.
local
Local store implementation — reads /nix/store + existing SQLite DB via SeaORM.
nar
NAR decompression — supports xz, zstd, and uncompressed NAR data.
profile
Nix profile management — symlink-based generation chains.
substitute
Substitution pipeline — fetch store paths from binary caches.
traits
Core store trait — the interface all store backends implement.