about summary refs log tree commit diff
path: root/library/std/src/sys/wasi/ext/io.rs
AgeCommit message (Collapse)AuthorLines
2021-05-03Move `std::sys::wasi::ext` to `std::os::wasi`Christiaan Dirkx-201/+0
2021-04-25Inline most raw socket, fd and handle conversionsKaiJewson-0/+21
2021-02-24Cast `libc::STDIN_FILENO` to `RawFd`.Dan Gohman-6/+6
WASI's `RawFd` is a `u32`, while `libc` uses `c_int`.
2021-02-23Enable API documentation for `std::os::wasi`.Dan Gohman-6/+6
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.
2020-10-08Implement `AsRawFd` for `StdinLock` etc. on WASI.Dan Gohman-0/+18
WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well.
2020-09-20spend another CI build to delete a double newlineWithout Boats-1/+0
2020-09-20fix typosWithout Boats-2/+2
2020-09-20Make RawFd implement the RawFd traitsWithout Boats-0/+20
2020-09-03Applied `#![deny(unsafe_op_in_unsafe_fn)]` in library/std/src/wasiAmjad Alsharafi-0/+1
All refactoring needed was only in `alloc.rs`, changed part of the code in `alloc` method to satisfy the SAFETY statement
2020-07-27mv std libs to library/mark-0/+142