Crates / Compare / tempfile vs tempdir
Rust crates side by side · data Oct 24, 2026
tempfile vs tempdir
Short answerBy steady daily use, tempfile is bigger: 2,442,469 real downloads a day against 46,615 for tempdir (52.4x). 38,054 crates depend on tempfile and 819 on tempdir. tempfile last shipped 7 months ago, tempdir 8.6 years ago.
tempfile
FoundationalFoundational and steady.
38,054 crates depend on it; no release in the last 90 days, so its count is all steady use.
A library for managing temporary files and directories.
tempdir
EstablishedEstablished and gaining.
819 crates depend on it; no release in the last 90 days, so its count is all steady use.
A library for managing a temporary directory and deleting all contents when it's dropped.
tempfiletempdir · 100% = that crate's normal quiet day, so a spike to 300% is triple its usual traffic
Every number, side by side
| Same window, same method | tempfile | tempdir |
|---|---|---|
| Real downloads a day | 2,442,469 | 46,615 |
| Crates that depend on it | 38,054 | 819 |
| Last release | 3.27.0, 7 months ago | 0.3.7, 8.6 years ago |
| Trend vs the field | +0% | +10% |
| Release-window share | 0.0% | 0.0% |
| Downloads in the window | 221,938,413 | 4,399,376 |
| All-time downloads | 919,827,889 | 45,665,490 |
| Versions published | 66 | 11 |
| License | MIT OR Apache-2.0 | MIT/Apache-2.0 |
| MSRV | 1.63 | not set |
| First published | Apr 14, 2015 | Feb 22, 2015 |
Which to pick
- Downloads tell you what is common, not what fits. Each crate's own description above says what it is for; when the jobs differ, pick by the job.
- When both fit, prefer the one more crates depend on (tempfile, 38,054 dependents): more eyes, more answered questions, and you may already have it in your tree.
- Check the release dates against your own pace: tempfile 7 months ago, tempdir 8.6 years ago.
Also in this space
Method
Real downloads = the median day with no release that day or the day before, from the crates.io API (Jul 27, 2026 to Oct 23, 2026). Raw crates.io counts include CI and bots and run high (why); the method is from our 90-day study. People search for this pair: Google suggests "rust tempfile vs tempdir".