Expand description
Verified download and local cache of published artifacts: data files and model weights that dspk crates use but do not ship (licences, size).
Artifact: what to fetch — id, family, file name, URI (hf://,gh://,zenodo://,https://,file://, seeproviders), expected SHA-256 and size.Hub:Hub::pulldownloads into theHubCacheand verifies hash and size before the file is committed (an artifact without a hash is refused);Hub::statusreads the cache index;Hub::verifyre-hashes.catalog: which artifacts exist, where they come from and whom to credit, as data only. Each domain is a feature (synapse: electrophysiology artifacts such as Kilosort4’s universal templates);pullfetches a catalog entry by id.
The crate depends on no other dspk crate: the catalogs describe files, the crates that read them (sorters, models) live elsewhere. All network access of the workspace’s libraries is here.
Re-exports§
pub use cache::ArtifactStatus;pub use cache::CachedArtifactRecord;pub use cache::HubCache;pub use cache::HubCacheIndex;pub use cache::compute_file_sha256;pub use catalog::Catalog;pub use catalog::CatalogEntry;pub use catalog::Credit;pub use catalog::CreditCode;pub use catalog::CreditPaper;pub use download::DownloadOutcome;pub use download::RemoteLinkCheck;pub use download::check_remote_link;pub use download::download_and_verify;pub use providers::ProviderKind;pub use providers::resolve_gh_uri;pub use providers::resolve_hf_uri;pub use providers::resolve_weights_uri;pub use providers::resolve_zenodo_uri;
Modules§
- cache
- Local cache of downloaded artifacts (
~/.cache/dspk/hub/orDSPK_HUB_DIR):models/<family>/<slug>/<file>plus anindex.jsonrecording each installed file’s hash and size, so status checks never re-read the files (HubCache::verifydoes). - catalog
- Catalogs of published artifacts, as data: what each file is, where it is downloaded from, how it is verified (SHA-256, size) and whom to credit.
- download
- Model weight downloader with streaming SHA-256 verification and remote link inspection.
- providers
- URI resolvers converting shorthand provider URIs (
hf://,gh://,zenodo://,https://,file://) into direct downloadable URLs.
Structs§
- Artifact
- A published file to fetch and verify.
- Artifact
Report - Local state and integrity of one artifact.
- Hub
- Downloads into and reads from a
HubCache.
Functions§
- pull
- Downloads (unless installed) and verifies catalog entry
idofCatalog::load_defaultinto the default cache (Hub::from_env_or_default), returning its local path.