Skip to main content

Crate hearth_pull

Crate hearth_pull 

Source
Expand description

hearth pull — get the bytes, prove they are the right bytes, and write down where they came from.

This is the half of the aggregator that was missing. hearth_resolve is deliberately network-free: it turns a reference into blob URLs, a chosen quantization and a byte count, with serde and serde_json as its entire dependency list. That is what lets the VRAM planner refuse a model before forty gigabytes move. This crate is what moves them.

Three properties, and the third is the one nobody else offers:

  1. Digest-verified. Every blob is hashed and compared against the digest the registry published. A download that does not match is deleted, not kept — a corrupt GGUF fails much later as an unexplainable tokenizer error, three layers away from the truth.
  2. Resumable. A 40 GiB transfer that dies at 39 GiB resumes. Restarting is not a recovery strategy, it is a way to never finish on a bad link.
  3. Recorded. PullStarted and PullCompleted land in the spine with the resolved source, so months later “where did this file come from” is a query — hearth why <model> — instead of an archaeology project. Those two transitions already existed in hearth_store; the history was ready before the downloader was.

Re-exports§

pub use registry::Blob;
pub use registry::Fetched;

Modules§

curl
HTTP by driving curl, not by linking one.
registry
Turning a reference into a list of blobs to fetch.
runtime
hearth runtime — fetch a prebuilt llama-server instead of hazing the operator with a compiler.

Structs§

PullConfig
Where blobs live, and how loud to be about it.
Pulled
What a pull did.

Functions§

blob_path
Content-addressed path for a digest. The filename IS the digest, which is what makes “do we already have this” a stat rather than a re-hash.
fetch_blob
Fetch one blob to its content-addressed home, verifying the digest.
human_bytes
Bytes as something a person can compare to a download page.
pull
Pull a model reference, recording the whole thing in the spine.