Discover and explore top open-source AI tools and projects—updated daily.
huggingfaceRust client for Hugging Face Hub API
Top 88.3% on SourcePulse
Summary
hf-hub is a Rust client library for the Hugging Face Hub API, designed to provide a typed, ergonomic, and performant interface for Rust developers. It offers a direct Rust equivalent to the popular huggingface-hub Python package, enabling seamless integration with Hugging Face's vast ecosystem of models, datasets, and spaces directly from Rust applications.
How It Works
The library provides dual interfaces: an asynchronous HFClient (default) and a synchronous HFClientSync (enabled via the blocking feature). Both interfaces mirror each other method-for-method, covering repository metadata operations, file uploads/downloads, commit history, branch/tag management, user/organization details, and bucket operations. It leverages Rust's type system for robust API interactions and supports Xet high-performance transfers for efficient data handling. Asynchronous list endpoints utilize Stream for lazy, memory-efficient iteration.
Quick Start & Requirements
hf-hub = "1.0.0" to Cargo.toml. For synchronous operations, use hf-hub = { version = "1.0.0", features = ["blocking"] }.hfrs command-line interface via cargo install --git https://github.com/huggingface/hf-hub.git.Highlighted Details
Stream for async list operations.hfrs CLI tool for direct terminal interaction with the Hub.Maintenance & Community
No specific details regarding maintainers, community channels (e.g., Discord, Slack), or roadmap are present in the provided README.
Licensing & Compatibility
The project is licensed under the Apache-2.0 license. This permissive license allows for commercial use and integration into closed-source projects without significant restrictions.
Limitations & Caveats
The provided README does not detail specific limitations, known bugs, or alpha/beta status. The library appears to offer a stable, feature-complete Rust interface mirroring the Python huggingface-hub package.
1 day ago
Inactive
punkpeye
modelcontextprotocol
PrefectHQ