Is the `errno` crate still necessary?

I wrote the errno crate when the std::io interfaces were still in flux and there was uncertainty around whether they would expose the underlying OS error codes.

But now, a menagerie of std::io::Error methods exist for just that. It appears that the only thing missing is the ability to modify the errno (set_errno), which doesn’t see much use in practice.

Are there any applications that use the errno crate, which cannot use std::io::Error instead? And if there are none, then should I deprecate this crate?

1 Like

The ability to set errno to zero is crucial for robust error handling of a number of Unix library calls, such as the getpw_() family. I'm certainly using it a lot, although not in publicly accessible code. So count that as a -1 for deprecation.