# tempfile

> Secure, cross-platform temporary files and directories for Rust

Source: https://talira.ai/catalog/tempfile-w5nny0mw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / filesystem](https://talira.ai/categories/libraries/filesystem)
- Platforms: linux, android, freebsd, netbsd, openbsd, macos, ios, watchos, visionos, windows[^2]
- Licence: MIT OR Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Steven Allen](https://talira.ai/orgs/steven-allen.md)

tempfile is a Rust library for creating temporary files and directories securely on every major operating system. Besides creating temporary files that are cleaned up for you, it can open several independent handles to the same temporary file safely, which is useful for producer and consumer patterns and hard to get right by hand. It runs on Linux, Android, the BSDs, illumos, macOS and other Apple platforms, Redox, WASI and Windows.

## Links

- Website: https://stebalien.com/projects/tempfile-rs/
- GitHub: https://github.com/Stebalien/tempfile
- Docs: https://docs.rs/tempfile

## Problems it solves

- create a temporary file in Rust that gets deleted automatically
- make a temporary directory for a Rust test and clean it up afterwards
- share one temporary file safely between a writer and a reader in Rust

## Features

- secure temporary files and directories
- several independent handles to one temporary file
- supports Linux, Android, BSDs, illumos, Apple platforms, Redox, WASI and Windows

## Trust

Overall: 0.51 out of 1.
Signals: maintenance 0.65, adoption 0.63, momentum 0.32, community 0.77, backing 0.30, extensibility 0.00.

- last commit 8 days ago
- 8 commits in the last 90 days
- 1.5k GitHub stars
- 82 contributors
- backed by Steven Allen

## Sources

[^1]: https://github.com/Stebalien/tempfile/blob/master/Cargo.toml (checked 28 Nov 2026)
[^2]: https://github.com/Stebalien/tempfile/blob/master/README.md (checked 28 Nov 2026)
