17 stable releases

2.2.0 Sep 14, 2025
2.1.3 Jul 19, 2025
2.1.2 Apr 27, 2024
2.1.1 Feb 6, 2024
0.0.0 May 10, 2019

#896 in Asynchronous

Download history 334294/week @ 2025-11-06 314460/week @ 2025-11-13 354093/week @ 2025-11-20 345263/week @ 2025-11-27 380687/week @ 2025-12-04 393575/week @ 2025-12-11 323547/week @ 2025-12-18 224168/week @ 2025-12-25 319916/week @ 2026-01-01 418401/week @ 2026-01-08 446175/week @ 2026-01-15 547868/week @ 2026-01-22 535160/week @ 2026-01-29 541863/week @ 2026-02-05 458303/week @ 2026-02-12 515138/week @ 2026-02-19

2,139,178 downloads per month
Used in 2,098 crates (85 directly)

Apache-2.0 OR MIT

64KB
512 lines

async-fs

CI License Cargo Documentation

Async filesystem primitives.

This crate is an async version of std::fs.

Implementation

This crate uses blocking to offload blocking I/O onto a thread pool.

Examples

Create a new file and write some bytes to it:

use async_fs::File;
use futures_lite::io::AsyncWriteExt;

let mut file = File::create("a.txt").await?;
file.write_all(b"Hello, world!").await?;
file.flush().await?;

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1MB
~16K SLoC