<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/stdio, branch stable</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=stable</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=stable'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-15T05:47:25+00:00</updated>
<entry>
<title>Rollup merge of #139517 - Ayush1325:uefi-cmd-stdin-null, r=joboet</title>
<updated>2025-04-15T05:47:25+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-04-15T05:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=46b197ad3b2173828e453617e15f65edc8dbe07d'/>
<id>urn:sha1:46b197ad3b2173828e453617e15f65edc8dbe07d</id>
<content type='text'>
std: sys: process: uefi: Use NULL stdin by default

According to the docs in `Command::output`:

&gt; By default, stdout and stderr are captured (and used to provide the
resulting output). Stdin is not inherited from the parent and any attempt by the child process to read from the stdin stream will result in the stream immediately closing.

This was being violated by UEFI which was inheriting stdin by default.

While the docs don't explicitly state that the default should be NULL, the behaviour seems like reading from NULL.

UEFI however, has a bit of a problem. The `EFI_SIMPLE_TEXT_INPUT_PROTOCOL` only provides support for reading 1 key press. This means that you either get an error, or it is assumed that the keypress was read successfully. So there is no way to have a successful read of length 0. Currently, I am returning UNSUPPORTED error when trying to read from NULL stdin. On linux however, you will get a read of length 0 for Null stdin.

One possible way to get around this is to translate one of the UEFI errors to a read 0 (Maybe unsupported?). It is also possible to have a non-standard error code, but well, not sure if we go that route.

Alternatively, if meaning of Stdio::Null is platform dependent, it should be fine to keep the current behaviour of returning an error.

cc ```@nicholasbishop``` ```@dvdhrm```
</content>
</entry>
<entry>
<title>std: sys: stdio: uefi: Tread UNSUPPORTED Status as read(0)</title>
<updated>2025-04-13T17:52:59+00:00</updated>
<author>
<name>Ayush Singh</name>
<email>ayush@beagleboard.org</email>
</author>
<published>2025-04-13T14:41:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=af25995d11f8630a071a7f4776f0798d22942a9f'/>
<id>urn:sha1:af25995d11f8630a071a7f4776f0798d22942a9f</id>
<content type='text'>
Allows implementing Stdio::Null for Command in a deterministic manner.

Signed-off-by: Ayush Singh &lt;ayush@beagleboard.org&gt;
</content>
</entry>
<entry>
<title>Rollup merge of #138876 - thaliaarchi:trusty-stdio, r=Noratrieb</title>
<updated>2025-04-06T16:08:09+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-04-06T16:08:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=962fa98eeb7da843d0f2dc4d2f3ac0a27ed267b2'/>
<id>urn:sha1:962fa98eeb7da843d0f2dc4d2f3ac0a27ed267b2</id>
<content type='text'>
Trusty: Implement `write_vectored` for stdio

Currently, `write` for stdout and stderr on Trusty is implemented with the semantics of `write_all`. Instead, call the underlying syscall only once in `write` and use the default implementation of `write_all` like other platforms. Also, implement `write_vectored` by adding support for `IoSlice`.

Refactor stdin to reuse the unsupported type like https://github.com/rust-lang/rust/pull/136769.

It requires #138875 to fix the build for Trusty, though they do not conflict and can merge in either order.

cc `@randomPoison`
</content>
</entry>
<entry>
<title>Move fd into sys</title>
<updated>2025-04-05T03:11:08+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-03-25T06:01:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4085af01836c3af3bd7c68060274ba7a0c334261'/>
<id>urn:sha1:4085af01836c3af3bd7c68060274ba7a0c334261</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Trusty: Implement write_vectored for stdio</title>
<updated>2025-03-27T23:49:30+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-03-24T02:45:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=41b04653f3d2fd9cd6451a586354257d661385e2'/>
<id>urn:sha1:41b04653f3d2fd9cd6451a586354257d661385e2</id>
<content type='text'>
Currently, `write` for stdout and stderr on Trusty is implemented with
the semantics of `write_all`. Instead, call the underlying syscall only
once in `write` and use the default implementation of `write_all` like
other platforms. Also, implement `write_vectored` by adding support for
`IoSlice`.

Refactor stdin to reuse the unsupported type like #136769.
</content>
</entry>
<entry>
<title>Auto merge of #136769 - thaliaarchi:io-optional-methods/stdio, r=joboet</title>
<updated>2025-03-23T06:23:51+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-03-23T06:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=60a3084f64607e86dd7715d72f11764cd500c364'/>
<id>urn:sha1:60a3084f64607e86dd7715d72f11764cd500c364</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Use unit structs for stateless stdio</title>
<updated>2025-03-22T08:21:23+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-02-18T22:29:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f6e90d804a82cce1606596f6116402843794deb3'/>
<id>urn:sha1:f6e90d804a82cce1606596f6116402843794deb3</id>
<content type='text'>
This seems to be the pattern for newer pal stdio types.
</content>
</entry>
<entry>
<title>Implement optional methods for unsupported stdio</title>
<updated>2025-03-22T08:21:23+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-02-07T21:59:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bd49a4beb703325a0356d64aef0b65e239033d61'/>
<id>urn:sha1:bd49a4beb703325a0356d64aef0b65e239033d61</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Rollup merge of #138301 - thaliaarchi:io-optional-methods/hermit, r=tgross35</title>
<updated>2025-03-18T09:09:29+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-03-18T09:09:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=800b8fbe39f28e4bd028beedf136f13721d218b8'/>
<id>urn:sha1:800b8fbe39f28e4bd028beedf136f13721d218b8</id>
<content type='text'>
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```
</content>
</entry>
<entry>
<title>Implement read_buf for Hermit</title>
<updated>2025-03-17T23:53:37+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-02-05T03:53:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c5fc1931a05f48fe3b4adf213ad3fcefb4e4434b'/>
<id>urn:sha1:c5fc1931a05f48fe3b4adf213ad3fcefb4e4434b</id>
<content type='text'>
</content>
</entry>
</feed>
