deputy-core 0.2.0

Domain types, the dependency-artifact state machine, and trait contracts for Deputy. No I/O.
Documentation
  • Coverage
  • 57.14%
    40 out of 70 items documented0 out of 0 items with examples
  • Size
  • Source code size: 27.56 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.63 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Ttimmahlax

deputy-core

crates.io docs.rs CI License: MIT OR Apache-2.0 Remade With Rust By Mata Network

The vocabulary every other crate agrees on. Domain types, the dependency-artifact state machine, and the trait contracts of Deputy — the personally-owned, verified vault and supply-chain gate for your code dependencies.

Most users want the CLI — deputy-cli — or the embeddable service, deputy-api. Depend on this crate directly only if you are implementing against Deputy's contracts: a new dependency ecosystem, an alternative store, your own scanner.

Part of Deputy, an initiative of Remade With Rust by Mata Network.


Why it performs no I/O

An audited supply chain is only as trustworthy as the states it can be in. So the pipeline's lifecycle lives here as a closed state machine with the legal edges spelled out, and transition is the only way to move — an illegal move is an Error::IllegalTransition, not a silently-accepted write:

Discovered ─▶ Acquired ─▶ Analyzed ─▶ Scanned ─┬─▶ Promoted ─▶ Deployed
                                       ▲       │
                                       │       └─▶ Quarantined
                                       └────── re-scan ──────┘

Keeping this crate I/O-free is what lets the rest of the workspace depend on contracts rather than on each other: deputy-store implements ArtifactStore, deputy-ecosystem implements DepEcosystem, and both are swappable and testable without a vault, a network, or a disk.

Contents

Module What's in it
ids ContentHash (algorithm-tagged, hex round-tripping), DepRef, Pin (a dependency plus its expected hash), ArtifactRef, SourceId, RepoId, EcosystemId
state ArtifactState + the legal-transition table, ScanVerdict, Finding, Severity
traits DepEcosystem (discover + fetch/verify), ArtifactStore, MetadataStore, StoreKind (Dirty / Prod)
error Error / Result — the shared error vocabulary

A Pin is the load-bearing type: acquisition is driven by resolved name@version with its checksum, never by a free-text name, which is what makes the pipeline tamper-evident and typosquat-resistant.

Install

cargo add deputy-core
use deputy_core::{ArtifactState, ContentHash, HashAlgo};

// The pipeline's legal edges are data, not convention.
let s = ArtifactState::Discovered.transition(ArtifactState::Acquired)?;
assert!(s.can_transition_to(ArtifactState::Analyzed));
assert!(!s.can_transition_to(ArtifactState::Deployed)); // must be scanned + promoted first

// Content addresses carry their algorithm, so a future migration is not a silent reinterpret.
let h = ContentHash::from_sha256_hex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")?;
assert_eq!(h.algo(), HashAlgo::Sha256);

Where this sits

Crate Role
deputy-core ← you are here — domain types, the artifact state machine, trait contracts
deputy-crypto Argon2id key derivation + AES-256-GCM sealing
deputy-id MATA mID verification, sessions, nonce + genesis-anchor stores
deputy-ecosystem lockfile parsing + fetch/verify behind DepEcosystem (Cargo first)
deputy-store the content-addressed dirty/prod vault + encrypted metadata
deputy-analyze language analytics + critical-point-of-failure scoring
deputy-scan integrity / advisory / substitution scanning → verdicts
deputy-acquire the fetch → verify → seal acquisition pipeline
deputy-deploy promotion receipts, the fail-closed gate, vendoring
deputy-api the API-first service layer — embed Deputy with this
deputy-cli the deputy binary — cargo install deputy-cli
deputy-ui the Dioxus web + desktop dashboard — not published

The crates mirror the pipeline they implement — discover → acquire → analyze → scan → promote → deploy (PIPELINE.md). Every crate in the workspace is #![forbid(unsafe_code)].

The Remade With Rust ecosystem

Remade With Rust is an initiative by Mata Network to rebuild essential C and C++ tools in Rust — for the memory safety, the predictable performance, and the freedom of a permissive license. Each project is a reimplementation, not a fork: same wire protocols and file formats, new code you can actually depend on. No copyleft. No surprises.

Project What it is
🎬 remade_ffmpeg_rs Our FFmpeg alternative. Drop-in ffmpeg and ffprobe binaries — demux → decode → filter → encode → mux, rebuilt as composable Rust crates with zero GPL/LGPL. Apache-2.0.
🧠 FFAI Our sister project: media for AI. "The AI media toolkit, remade with rust." Embedded ASR + TTS (Mercury), OCR (Carmenta) and vision-language captioning (Argus) behind an ffmpeg-style, swap-by-name architecture — no Python, no CUDA. MIT OR Apache-2.0.
🌐 Mata Network The home page. "Stop sacrificing your privacy for convenience." Sovereign, self-hostable privacy infrastructure — wallet & identity, password manager, contact manager, and a browser extension that stops information leaking as you browse. Remade With Rust is its open-source arm.

→ All projects: github.com/Remade-With-Rust

License

Dual-licensed, at your option, under either of:

Free for anyone to use, for any purpose, including commercially — no fees, no copyleft.