system-interface adds extensions to the Rust standard library, seeking to
stay within the style of std, while exposing additional functionality:
fs::FileIoExt- Extra support for working with files, including all the features ofstd::io::Read,std::io::Write,std::io::Seek, andstd::os::unix::fs::FileExt, but with both POSIX-ish and Windows support, and with additional features, includingreadandwritewith all combinations of_vectored,_at, and_exact/_all. If you've ever wanted something likeread_exact_vectored_at,write_all_vectored_at, or any other combination, or evenread_to_end_atorread_to_string_at, they're all here, and they work on Windows too!io::IsTerminal- Test whether a given I/O handle refers to a terminal (aka a tty).io::ReadReady- Query the number of bytes ready to be read immediately from an I/O handle.io::Peek- Read from an I/O handle without consuming the data.
Everything in this crate is portable across popular POSIX-ish platforms and Windows.
Many of system-interface's features correspond to features in WASI, and are
designed to work with cap-std, however it's not specific to WASI and can be
used with regular std too. To separate concerns, all sandboxing and
capability-oriented APIs are left to cap-std, so this crate's features are
usable independently.
Support for async-std and socket2 is temporarily disabled until those crates contain the needed implementations of the I/O safety traits.