Skip to content

Commit 375067f

Browse files
committed
doc(README): document supported platforms
1 parent d353717 commit 375067f

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
tempfile
2-
========
1+
# tempfile
32

43
[![Crate](https://img.shields.io/crates/v/tempfile.svg)](https://crates.io/crates/tempfile)
54
[![Build Status](https://github.com/Stebalien/tempfile/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Stebalien/tempfile/actions/workflows/ci.yml?query=branch%3Amaster)
@@ -11,8 +10,7 @@ patterns and surprisingly difficult to implement securely).
1110

1211
[Documentation](https://docs.rs/tempfile/)
1312

14-
Usage
15-
-----
13+
## Usage
1614

1715
Minimum required Rust version: 1.63.0
1816

@@ -23,8 +21,27 @@ Add this to your `Cargo.toml`:
2321
tempfile = "3"
2422
```
2523

26-
Example
27-
-------
24+
## Supported Platforms
25+
26+
This crate supports all major operating systems:
27+
28+
- Linux
29+
- Android
30+
- MacOS
31+
- Windows
32+
- FreeBSD (likely other BSDs but we don't have CI for them)
33+
- RedoxOS
34+
- Wasm (build and link only, Wasm doesn't have a filesystem)
35+
- WASI P1 & P2.
36+
37+
However:
38+
39+
- Android, RedoxOS, Wasm, and WASI targets all require the latest stable rust compiler.
40+
- WASI P1/P2 does not define a default temporary directory. You'll need to explicitly call `tempfile::env::override_temp_dir` with a valid directory or temporary file creation will panic on this platform.
41+
- WASI P1/P2 does not have file permissions.
42+
- You _may_ need to override the temporary directory in Android as well to point at your application's per-app cache directory.
43+
44+
## Example
2845

2946
```rust
3047
use std::fs::File;

0 commit comments

Comments
 (0)