Skip to main content

Module bundle

Module bundle 

Source
Expand description

Bundle fetching + caching.

Two layers, split by what they need from the host:

  • cache_key is pure and always compiled: URL-to-cache-entry addressing, the path-segment allowlist, LeapBundles manifest URLs and catalog parsing. The browser store in cera-wasm builds on this, which is why it isn’t behind the remote feature.
  • BundleRepo (behind remote, so named and not linked) is the native store: a reqwest::blocking downloader over an on-disk tree, with SHA-256 integrity and sidecar caching.

A wasm32 build gets the first and not the second (there is no filesystem and no reqwest) and supplies its own OPFS-backed store that shares the addressing above. See cera-wasm’s bundle module.

Re-exports§

pub use cache_key::LeapBundleEntry;
pub use cache_key::known_bundle_manifest;
pub use cache_key::leap_bundles_manifest_url;
pub use hf::GgufFileEntry;
pub use hf::HfModelInfo;
pub use hf::HfRepoContents;
pub use hf::HfSibling;
pub use hf::HfSpec;
pub use hf::classify_repo_siblings;
pub use hf::default_cache_dir;
pub use hf::extract_quant_from_filename;
pub use hf::resolve_hf_manifest;

Modules§

cache_key
Cache-key and catalog logic shared by every bundle store.
hf
Hugging Face model repository resolution and auxiliary file pairing.