rustio rustio.net
67

safetensors

v0.7.0 Growing

Provides functions to read and write safetensors which aim to be safer than their PyTorch counterpart. The format is 8 bytes which is an unsized int, being the size of a JSON header, the JSON header refers the `dtype` the `shape` and `data_offsets` which are the offsets for the values in the rest of the file.

Apache-2.0 Edition 2021 MSRV 1.80
#tensorflow#pytorch#huggingface#tensors#safetensors

Quick Verdict

  • !Pre-1.0: API may have breaking changes
  • βœ“Massive adoption (2.1K crates depend on it)
  • βœ“Permissive license (Apache-2.0)

Security

Checking security advisories...
Downloads
14.2M
Dependents
2.1K
Releases
21
Size
31KB

Deep Insights

πŸ“ˆ
Strong growth momentum

1.9M downloads in the last 30 days (62.4K/day), up 31% from the previous period.

πŸ”—
Widely adopted

2.1K crates depend on safetensors. Strong ecosystem adoption means battle-tested code and long-term stability.

πŸ‘€
Prolific maintainer

The primary maintainer publishes 55 crates. This suggests deep Rust expertise and long-term commitment to the ecosystem.

πŸ”¬
Pre-1.0 for over a year

Despite being 3+ years old, safetensors hasn't reached 1.0 yet. Expect potential API changes between versions.

πŸ“
Compact crate

At 30KB, safetensors is lightweight. Small crate size correlates with focused, well-scoped functionality.

🌟
Used by top crates

Notable dependents include tch, candle-core, ug, candle-nn, tract-nnef. When high-quality crates choose safetensors, it's a strong quality signal.

Health Breakdown

Maintenance 14/25

Recency, release consistency, active ratio

Quality 16/25

Yanked ratio, deps, size, maturity, features

Community 14/20

Reverse deps, ownership, ecosystem

Popularity 8/15

Downloads, momentum, growth trend

Documentation 15/15

Docs, repo, license, metadata

Download Trend

Daily downloads Β· last 90 days
64K/day avg-34%
050K100K150K200K250K2/263/164/34/215/95/26

Top Dependents

Version Adoption

v0.4.5
55%
v0.7.0
23%
v0.6.2
18%
v0.5.3
3%
v0.4.4
1%

Release Timeline

10 releasessince 2024
J
F
M
A
M
J
J
A
S
O
N
D
2024
2
2025
8
2026
Less
More

Feature Flags

default =["std"]

std*alloc

README

Loading README...

Maintainers

Dependencies
6
direct dependencies
Dependents
2.1K
crates depend on safetensors

Similar Crates