rustio rustio.net
65

safetensors

v0.8.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 (4.3K crates depend on it)
  • βœ“Permissive license (Apache-2.0)

Security

Checking security advisories...
Downloads
30.0M
Dependents
4.3K
Releases
22
Size
35KB

Deep Insights

πŸ“ˆ
Strong growth momentum

5.3M downloads in the last 30 days (176.7K/day), up 42% from the previous period.

πŸ”—
Widely adopted

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

πŸ‘€
Prolific maintainer

The primary maintainer publishes 56 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 34KB, safetensors is lightweight. Small crate size correlates with focused, well-scoped functionality.

🌟
Used by top crates

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

Health Breakdown

Maintenance 13/25

Recency, release consistency, active ratio

Quality 15/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
29K/day avg-100%
050K100K150K200K250K8/239/109/2810/1611/311/20

Top Dependents

Version Adoption

v0.4.5
43%
v0.7.0
31%
v0.8.0
12%
v0.6.2
11%
v0.5.3
4%

Release Timeline

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

Feature Flags

default =["std"]

std*alloc

README

Loading README...

Maintainers

Dependencies
8
direct dependencies
Dependents
4.3K
crates depend on safetensors

Similar Crates