about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stdio.rs
AgeCommit message (Collapse)AuthorLines
2019-04-10std: Add `{read,write}_vectored` for more typesAlex Crichton-13/+17
This commit implements the `{read,write}_vectored` methods on more types in the standard library, namely: * `std::fs::File` * `std::process::ChildStd{in,out,err}` * `std::io::Std{in,out,err}` * `std::io::Std{in,out,err}Lock` * `std::io::Std{in,out,err}Raw` Where supported the OS implementations hook up to native support, otherwise it falls back to the already-defaulted implementation.
2019-02-28libstd => 2018Taiki Endo-4/+3
2019-02-23Remove pub(crate) from stderr_rawPaul Dicker-1/+1
2019-02-20Use standard Read/Write traits in sys::stdioPaul Dicker-8/+14
2019-02-20Remove sys::*::Stderr Write implementationPaul Dicker-14/+1
2019-02-08std::sys::unix::stdio: explain why we do into_rawRalf Jung-3/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-06Refactor stderr_prints_nothing into a more modular functionJethro Beekman-2/+2
2018-04-13std: Minimize size of panicking on wasmAlex Crichton-0/+4
This commit applies a few code size optimizations for the wasm target to the standard library, namely around panics. We notably know that in most configurations it's impossible for us to print anything in wasm32-unknown-unknown so we can skip larger portions of panicking that are otherwise simply informative. This allows us to get quite a nice size reduction. Finally we can also tweak where the allocation happens for the `Box<Any>` that we panic with. By only allocating once unwinding starts we can reduce the size of a panicking wasm module from 44k to 350 bytes.
2017-11-08std: Change how EBADF is handled in `sys`Alex Crichton-1/+4
This commit removes the reexport of `EBADF_ERR` as a constant from libstd's portability facade, instead opting for a platform-specific function that specifically queries an `io::Error`. Not all platforms may have a constant for this, so it makes the intent a little more clear that a code need not be supplied, just an answer to a query.
2017-06-20Add `Read::initializer`.Steven Fackler-7/+0
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2016-11-28Commit to fix make tidyJeremy Soller-1/+1
2016-11-28Move stdout/err flush into sysJeremy Soller-1/+12
2016-11-01std: Move a plattform-specific constant to sys::stdioBrian Anderson-0/+1
2016-10-01std: Move platform specific stdio code into sysBrian Anderson-0/+2
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-2/+0
2016-03-08std: Funnel read_to_end through to one locationAlex Crichton-0/+9
This pushes the implementation detail of proxying `read_to_end` through to `read_to_end_uninitialized` all the way down to the `FileDesc` and `Handle` implementations on Unix/Windows. This way intermediate layers will also be able to take advantage of this optimized implementation. This commit also adds the optimized implementation for `ChildStdout` and `ChildStderr`.
2015-09-08some more clippy-based improvementsAndre Bogus-3/+3
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-03syntax: Implement #![no_core]Alex Crichton-0/+1
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-06-14Implement RFC 1014Steven Fackler-3/+3
Closes #25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
2015-03-13Fallout of std::old_io deprecationAlex Crichton-0/+10
2015-02-28std: Implement stdio for `std::io`Alex Crichton-0/+52
This is an implementation of RFC 899 and adds stdio functionality to the new `std::io` module. Details of the API can be found on the RFC, but from a high level: * `io::{stdin, stdout, stderr}` constructors are now available. There are also `*_raw` variants for unbuffered and unlocked access. * All handles are globally shared (excluding raw variants). * The stderr handle is no longer buffered. * All handles can be explicitly locked (excluding the raw variants). The `print!` and `println!` machinery has not yet been hooked up to these streams just yet. The `std::fmt::output` module has also not yet been implemented as part of this commit.