summary refs log tree commit diff
path: root/library/std/src/os/mod.rs
AgeCommit message (Collapse)AuthorLines
2021-05-03Allow documenting on `hermit`Christiaan Dirkx-2/+0
2021-05-03Rework `os` to avoid using `cfg_if!` with public itemsChristiaan Dirkx-87/+115
2021-05-03Move `std::sys::wasi::ext` to `std::os::wasi`Christiaan Dirkx-2/+1
2021-05-03Move `std::sys::unix::ext` to `std::os::unix`Christiaan Dirkx-4/+2
2021-05-03Move `std::sys::windows::ext` to `std::os::windows`Christiaan Dirkx-4/+2
2021-05-03Move `std::sys::hermit::ext` to `std::os::hermit`Christiaan Dirkx-1/+6
2021-05-03Cleanup `std::os`Christiaan Dirkx-74/+89
2021-03-03Rollup merge of #82712 - CDirkx:cfg-target_os, r=dtolnayYuki Okushi-1/+1
Remove unnecessary conditional `cfg(target_os)` for `redox` and `vxworks` `redox` and `vxworks` are now part of target_family `unix`, thus `cfg(unix)` already implies `cfg(target_os="redox")` and `cfg(target_os="vxworks")` https://github.com/rust-lang/rust/blob/35dbef235048f9a2939dc20effe083ca483c37ff/compiler/rustc_target/src/spec/redox_base.rs#L26 https://github.com/rust-lang/rust/blob/35dbef235048f9a2939dc20effe083ca483c37ff/compiler/rustc_target/src/spec/vxworks_base.rs#L27
2021-03-03Remove unnecessary conditional `cfg(target_os)` for `redox` and `vxworks`Christiaan Dirkx-1/+1
`redox` and `vxworks` are part of target_family `unix`, thus `cfg(unix)` already implies `cfg(target_os="redox")` and `(target_os="vxworks")`
2021-03-01Add missing stability attributes in libstdGuillaume Gomez-0/+1
2021-02-24Mention "wasi" in the comment about "main modules".Dan Gohman-1/+1
2021-02-24Make the main `wasi` module `cfg(not(doc))`.Dan Gohman-2/+4
2021-02-23Enable API documentation for `std::os::wasi`.Dan Gohman-0/+3
This adds API documentation support for `std::os::wasi` modeled after how `std::os::unix` works, so that WASI can be documented [here] along with the other platforms. [here]: https://doc.rust-lang.org/stable/std/os/index.html Two changes of particular interest: - This changes the `AsRawFd` for `io::Stdin` for WASI to return `libc::STDIN_FILENO` instead of `sys::stdio::Stdin.as_raw_fd()` (and similar for `Stdout` and `Stderr`), which matches how the `unix` version works. `STDIN_FILENO` etc. may not always be explicitly reserved at the WASI level, but as long as we have Rust's `std` and `libc`, I think it's reasonable to guarantee that we'll always use `libc::STDIN_FILENO` for stdin. - This duplicates the `osstr2str` utility function, rather than trying to share it across all the configurations that need it.
2021-02-22Avoid `cfg_if` in `std::os`Jonas Schievink-27/+27
2020-07-27mv std libs to library/mark-0/+74