modelshelf 0.1.0

A shared local LLM model registry: discover, deduplicate, download, and update models across desktop apps.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Model acquisition: Hugging Face Hub client with resumable, verified
//! downloads.

pub mod hf;

/// Download progress, reported via [`ProgressFn`].
#[derive(Debug, Clone, Copy)]
pub struct Progress {
    /// Bytes downloaded so far (including any resumed prefix).
    pub downloaded_bytes: u64,
    /// Total size if the server reported one.
    pub total_bytes: Option<u64>,
}

/// Progress callback type. Boxed `Fn` keeps the API object-safe for FFI.
pub type ProgressFn = dyn Fn(Progress) + Send + Sync;