<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/stdio, branch auto</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=auto</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=auto'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-25T21:34:20+00:00</updated>
<entry>
<title>std: fix warning in VEXos stdio module</title>
<updated>2025-09-25T21:34:20+00:00</updated>
<author>
<name>Tropical</name>
<email>42101043+Tropix126@users.noreply.github.com</email>
</author>
<published>2025-09-25T21:34:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ede3fe48c0d373d3673459218e1b9e7eaa667b8'/>
<id>urn:sha1:0ede3fe48c0d373d3673459218e1b9e7eaa667b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: add support for armv7a-vex-v5 target</title>
<updated>2025-09-24T17:10:15+00:00</updated>
<author>
<name>Tropical</name>
<email>42101043+Tropix126@users.noreply.github.com</email>
</author>
<published>2025-09-24T17:10:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b2634e31c435aeff149c5660f9329a0578ad1e72'/>
<id>urn:sha1:b2634e31c435aeff149c5660f9329a0578ad1e72</id>
<content type='text'>
Co-authored-by: Lewis McClelland &lt;lewis@lewismcclelland.me&gt;
</content>
</entry>
<entry>
<title>std: Implement WASIp2-specific stdio routines</title>
<updated>2025-09-04T16:15:10+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2025-09-04T04:49:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d8ca776f6de1d484afc9f847f558bd32b94ceced'/>
<id>urn:sha1:d8ca776f6de1d484afc9f847f558bd32b94ceced</id>
<content type='text'>
This commit is an extension of previous libstd support but applied to stdio
specifically. The stdio routines are updated away from WASIp1 APIs to using
WASIp2 APIs natively. The end goal is to eventually drop the dependency on
WASIp1 APIs in the standard library entirely in favor of exclusively depending
on WASIp2.
</content>
</entry>
<entry>
<title>library: Migrate from `cfg_if` to `cfg_select`</title>
<updated>2025-08-16T12:28:31+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-08-10T21:25:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ae4a0cc3487f28b29f36afe8056535afad21e7b'/>
<id>urn:sha1:1ae4a0cc3487f28b29f36afe8056535afad21e7b</id>
<content type='text'>
Migrate the standard library from using the external `cfg_if` crate to
using the now-built-in `cfg_select` macro.

This does not yet eliminate the dependency from
`library/std/Cargo.toml`, because while the standard library itself no
longer uses `cfg_if`, it also incorporates the `backtrace` crate, which
does.

Migration assisted by the following vim command (after selecting the
full `cfg_if!` invocation):

```
'&lt;,'&gt;s/\(cfg_if::\)\?cfg_if/cfg_select/ | '&lt;,'&gt;s/^\( *\)} else {/\1}\r\1_ =&gt; {/c | '&lt;,'&gt;s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 =&gt; /e | '&lt;,'&gt;s/if #\[cfg(\(.*\))\] {/\1 =&gt; {/e
```

This is imperfect, but substantially accelerated the process. This
prompts for confirmation on the `} else {` since that can also appear
inside one of the arms. This also requires manual intervention to handle
any multi-line conditions.
</content>
</entry>
<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>
</feed>
