summary refs log tree commit diff
path: root/library/std/src/sys/stdio
AgeCommit message (Collapse)AuthorLines
2025-03-23Auto merge of #136769 - thaliaarchi:io-optional-methods/stdio, r=joboetbors-133/+101
Provide optional `Read`/`Write` methods for stdio Override more of the default methods for `io::Read` and `io::Write` for stdio types, when efficient to do so, and deduplicate unsupported types. Tracked in https://github.com/rust-lang/rust/issues/136756. try-job: x86_64-msvc-1
2025-03-22Use unit structs for stateless stdioThalia Archibald-12/+12
This seems to be the pattern for newer pal stdio types.
2025-03-22Implement optional methods for unsupported stdioThalia Archibald-1/+64
Match what `std::io::Empty` does, since it is very similar. However, still evaluate the `fmt::Arguments` in `write_fmt` to be consistent with other platforms.
2025-03-18Rollup merge of #138301 - thaliaarchi:io-optional-methods/hermit, r=tgross35Matthias Krüger-4/+1
Implement `read_buf` for Hermit Following https://github.com/hermit-os/kernel/pull/1606, it is now safe to implement `Read::read_buf` for file descriptors on Hermit. cc ```@mkroening```
2025-03-17Implement read_buf for HermitThalia Archibald-4/+1
2025-03-13Rollup merge of #137355 - thaliaarchi:io-optional-methods/sgx, r=ChrisDentonMatthias Krüger-1/+32
Implement `read_buf` and vectored read/write for SGX stdio Implement `read_buf`, `read_vectored`, and `write_vectored` for the SGX stdio types. Additionally, extend `User<T>::copy_to_enclave` to work for copying to uninitialized values and fix unsoundness in `UserRef<[T]>::copy_to_enclave_vec`. cc ``@jethrogb`` Tracked in https://github.com/rust-lang/rust/issues/136756
2025-03-11Deduplicate platform stdio typesThalia Archibald-126/+31
2025-03-10Update Trusty support to account for recent libstd reorganizationNicole L-0/+84
2025-03-10Implement read_buf and vectored read/write for SGX stdioThalia Archibald-1/+32
2025-03-09std: move stdio to `sys`joboet-0/+1461
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.