Stebalien / tempfile

Temporary file library for rust
http://stebalien.com/projects/tempfile-rs
Apache License 2.0
1.2k stars 120 forks source link

Provide implementations for I/O safety traits unconditionally #244

Closed LingMan closed 1 year ago

LingMan commented 1 year ago

The first commit is a cleanup removing the build script. Until now it gated the implementation of AsFd / AsHandle on the existence of these traits in std. They have been stabilized with Rust 1.63 which will soon be this crate's MSRV.

I'll rebase this PR once that has landed. Until then CI will obviously fail.

The second commit enables AsFd/AsRawFd implementations on wasi, since std provides the traits there as well.

Stebalien commented 1 year ago

(I'll let you rebase then merge when the tests pass)

LingMan commented 1 year ago

Ok, slight annoyance with the import paths: AsFd and friends exist since 1.63, but they were located at std::os::{unix,wasi}::io until 1.66. Now they are also exported from std::os::fd, which is the only documented path.