Skip to content

Conversation

sunfishcode
Copy link
Member

Patches introducing new features will be released in rustix 1.1. This PR is a backport of patches for 1.0.

sunfishcode and others added 8 commits July 15, 2025 07:36
These tests appear to be failing on FreeBSD 15 due to a difference in behavior
on `SOCK_SEQPACKET` FreeBSD 15. They pass on FreeBSD 14 and on other OS's.
* Expand the windows-sys dependency to include 0.60.0.

Expand the windows-sys dependency to ">=0.52, <0.61", to support the new
windows-sys 0.60.

windows-sys 0.60 does make one change that affected rustix, which is to
move the `BOOL` type from `windows_sys::Win32::Foundation::BOOL` to
`windows_sys::core::BOOL`, so to support both old and new versions, just
hard-code the `BOOL` type, as it's just an `i32` and always will be.

* Pin more packages for the MSRV build.

* Fix warnings.

* Disable more test on FreeBSD.
This works around the issue filed upstream in rust-lang/rust#143164.
As advised in #1475, the compiler-builtins dependency is no longer
needed. It was only used in rustc-dep-of-std mode.

Fixes #1475.
* Use new `hints.mostly-unused`

Most users of the `rustix` crate will use a fraction of its API surface
area.

Nightly rustc provides an option `-Zhint-mostly-unused` to tell it to
defer as much compilation as possible, which provides a substantial
performance improvement if most of that compilation doesn't end up
happening. Cargo plumbs this option through using the new `[hints]`
table. This will cause users of the `rustix` crate to default to setting
`hint-mostly-unused`. (Top-level crates can override this if they wish,
using a new profile option.)

Note that setting this hint does not increase the MSRV of the rustix
crate, as old versions of Cargo will ignore it. New versions of Cargo
will respect it automatically (and, until we stabilize it, Cargo will do
nothing unless you pass `-Zprofile-hint-mostly-unused` to cargo).

Some sample performance numbers: this takes `rustix` compilation time
with `all-apis` enabled from 5.9s to 4.3s (a 27% improvement).

* Add comment to the mostly-unused hint
#1484)

* Don't let a mismatch AT_SYSINFO_EHDR image preclude use of AUX values.

If the ELF image pointed to by the `AT_SYSINFO_EHDR` AUX record doesn't
match the architecture rustix is compiled for, don't use it, but do
continue to use the rest of the AUX fields.

Fixes #1465.

* Fix a warning.
As pointed out in #1479, `unshare` can lead to threads observing
dangling file descriptors. Deprecate it, and add a new `unshare_unsafe`
that's unsafe, to reflect this.

Fixes #1479.
@sunfishcode sunfishcode merged commit 77151a7 into 1.0 Jul 15, 2025
49 of 51 checks passed
@sunfishcode sunfishcode deleted the origin/1.0-updates branch July 15, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants