<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/fd, branch automation/bors/try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-04T00:01:51+00:00</updated>
<entry>
<title>Rollup merge of #140459 - niklasf:feature/read-buf-at, r=tgross35</title>
<updated>2025-09-04T00:01:51+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-04T00:01:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f073f64eb687280fa626541a7649e9e805d21e63'/>
<id>urn:sha1:f073f64eb687280fa626541a7649e9e805d21e63</id>
<content type='text'>
Add `read_buf` equivalents for positioned reads

Adds the following items under the ~~`read_buf` (rust-lang/rust#78485)~~ `read_buf_at` (rust-lang/rust#140771) feature:

 - `std::os::unix::fs::FileExt::read_buf_at`
 - `std::os::unix::fs::FileExt::read_buf_exact_at`
 - `std::os::windows::fs::FileExt::seek_read_buf`

try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
</content>
</entry>
<entry>
<title>Add `read_buf` equivalents for positioned reads</title>
<updated>2025-09-03T18:43:38+00:00</updated>
<author>
<name>Niklas Fiekas</name>
<email>niklas.fiekas@backscattering.de</email>
</author>
<published>2025-04-29T12:30:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c914c471b9d83f9e6c74b0e6c2c8044efd3a57dd'/>
<id>urn:sha1:c914c471b9d83f9e6c74b0e6c2c8044efd3a57dd</id>
<content type='text'>
Adds the following items under the `read_buf_at` feature:

 - `std::os::unix::fs::FileExt::read_buf_at`
 - `std::os::unix::fs::FileExt::read_buf_exact_at`
 - `std::os::windows::fs::FileExt::seek_read_buf`
</content>
</entry>
<entry>
<title>Rollup merge of #144452 - morinmorin:apple/update_read_limit, r=ChrisDenton</title>
<updated>2025-08-23T20:22:15+00:00</updated>
<author>
<name>Samuel Tardieu</name>
<email>sam@rfc1149.net</email>
</author>
<published>2025-08-23T20:22:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=982b022b1e713ddff01071bd0538329b279c788b'/>
<id>urn:sha1:982b022b1e713ddff01071bd0538329b279c788b</id>
<content type='text'>
std/sys/fd: Relax `READ_LIMIT` on Darwin

Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte &gt; INT_MAX`. The case `nbyte == INT_MAX` is valid, so the subtraction (`- 1`) in
```rust
const READ_LIMIT: usize = if cfg!(target_vendor = "apple") {
    libc::c_int::MAX as usize - 1 // &lt;- HERE
} else {
    libc::ssize_t::MAX as usize
};
```
can be removed.

I tested that the case `nbyte == INT_MAX` is valid on various versions of macOS, including old one like Mac OS X 10.5.

The man page says:
- read() and pread() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/read.2.html)
- write() and pwrite() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/write.2.html)

Here are links to Darwin's code:
- [macOS 15.5] https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/bsd/kern/sys_generic.c#L307
- [Mac OS X 10.2] https://github.com/apple/darwin-xnu/blob/d738f900846ed2d5f685e18bf85ce63b0176f61a/bsd/kern/sys_generic.c#L220

Related PR: rust-lang/rust#38622.
</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>std/sys/fd: remove `- 1` from `READ_LIMIT` on Darwin</title>
<updated>2025-07-25T14:22:36+00:00</updated>
<author>
<name>morinmorin</name>
<email>mimomorin@gmail.com</email>
</author>
<published>2025-07-25T14:22:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a6f266612a42737ee46b69645244975e75406b60'/>
<id>urn:sha1:a6f266612a42737ee46b69645244975e75406b60</id>
<content type='text'>
Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte &gt; INT_MAX`.
The case `nbyte == INT_MAX` is valid, so the subtraction can be removed.
</content>
</entry>
<entry>
<title>Rollup merge of #139667 - 1c3t3a:remove-no-sanitize, r=m-ou-se</title>
<updated>2025-04-16T22:16:21+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-04-16T22:16:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f14e6322702c60dae7d3e702608906b437986529'/>
<id>urn:sha1:f14e6322702c60dae7d3e702608906b437986529</id>
<content type='text'>
cfi: Remove #[no_sanitize(cfi)] for extern weak functions

Previously (https://github.com/rust-lang/rust/pull/115200, https://github.com/rust-lang/rust/pull/138002), we added `#[no_sanitize(cfi)]` to all code paths that call to a weakly linked function.

In https://github.com/rust-lang/rust/pull/138349 we fixed the root cause for this issue, which means we can now remove the corresponding attributes.

r? `@rcvalle`
</content>
</entry>
<entry>
<title>cfi: Remove #[no_sanitize(cfi)] for extern weak functions</title>
<updated>2025-04-11T10:15:55+00:00</updated>
<author>
<name>Bastian Kersting</name>
<email>bkersting@google.com</email>
</author>
<published>2025-04-11T10:15:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=068a33245981765c3678434d5bcb71bd63d5598a'/>
<id>urn:sha1:068a33245981765c3678434d5bcb71bd63d5598a</id>
<content type='text'>
Previously (https://github.com/rust-lang/rust/pull/115200,
https://github.com/rust-lang/rust/pull/138002), we
added `#[no_sanitize(cfi)]` to all code paths that call to a weakly
linked function.

In https://github.com/rust-lang/rust/pull/138349 we fixed the root cause
for this issue, which means we can now remove the corresponding
attributes.
</content>
</entry>
<entry>
<title>std: Fix build for NuttX targets</title>
<updated>2025-04-05T19:05:43+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-03-26T07:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0acac2cbe306b8db9bc0a7c45f529f1dfa6680c8'/>
<id>urn:sha1:0acac2cbe306b8db9bc0a7c45f529f1dfa6680c8</id>
<content type='text'>
Fix std build for all NuttX targets. It is the single largest set of
failures on &lt;https://does-it-build.noratrieb.dev/&gt;. Although, ESP-IDF
also requires these same gates, there are other issues for those
targets.

This can verified be running `x check library/std --target=` for all
NuttX targets.
</content>
</entry>
<entry>
<title>Fix unsafe_op_in_unsafe_fn for Unix fd and weak</title>
<updated>2025-04-05T03:11:08+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-03-29T01:19:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ab22fabf1a21077556c708633ceaefbb678c178'/>
<id>urn:sha1:3ab22fabf1a21077556c708633ceaefbb678c178</id>
<content type='text'>
</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>
</feed>
