rustio rustio.net
70

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

  • βœ“Actively maintained (updated 34d ago)
  • !Pre-1.0: API may have breaking changes
  • βœ“Massive adoption (2.9K crates depend on it)
  • βœ“Permissive license (Apache-2.0)

Security

Checking security advisories...
Downloads
18.0M
Dependents
2.9K
Releases
22
Size
35KB

Deep Insights

πŸ“Š
Steady growth

2.5M downloads in the last 30 days (81.7K/day), up 14% from the previous period.

πŸ”—
Widely adopted

2.9K 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 34KB, safetensors is lightweight. Small crate size correlates with focused, well-scoped functionality.

🌟
Used by top crates

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

Health Breakdown

Maintenance 18/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
63K/day avg-19%
020K40K60K80K100K4/265/146/16/197/77/24

Top Dependents

Version Adoption

v0.4.5
50%
v0.7.0
29%
v0.6.2
15%
v0.5.3
4%
v0.8.0
2%

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
2.9K
crates depend on safetensors

Similar Crates