Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 42 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [stable, nightly, 1.63]
build: [stable, nightly, 1.65]
include:
- build: stable
os: ubuntu-latest
rust: stable
- build: nightly
os: ubuntu-latest
rust: nightly
- build: 1.63
- build: 1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65

env:
# -D warnings is commented out in our install-rust action; re-add it here.
Expand All @@ -48,19 +48,16 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- name: Use specific dependency versions for Rust 1.63 compatibility.
if: matrix.rust == '1.63'
- name: Use specific dependency versions for Rust 1.65 compatibility.
if: matrix.rust == '1.65'
run: |
cargo update --package=dashmap --precise 5.4.0
cargo update --package=regex --precise=1.9.0
cargo update --package=half --precise=2.2.1
cargo update --package=flate2 --precise=1.0.35
cargo update --package=syn --precise=2.0.106
cargo update --package=textwrap --precise=0.16.1
cargo update --package=once_cell --precise=1.20.3
cargo update --package=parking_lot --precise=0.12.3
cargo update --package=parking_lot_core --precise=0.9.10
cargo update --package=lock_api --precise=0.4.12
cargo update --package=parking_lot --precise=0.12.4
cargo update --package=parking_lot_core --precise=0.9.11
cargo update --package=lock_api --precise=0.4.13
cargo update --package=rayon --precise=1.10.0
cargo update --package=rayon-core --precise=1.12.1
cargo update --package=windows-sys --precise=0.60.2
Expand Down Expand Up @@ -107,13 +104,13 @@ jobs:
aarch64-linux-android
aarch64-apple-ios
i686-pc-windows-msvc
- if: matrix.rust != '1.63'
- if: matrix.rust != '1.65'
run: >
rustup target add
wasm32-wasip1
wasm32-wasip2
x86_64-unknown-fuchsia
- if: matrix.rust == '1.63'
- if: matrix.rust == '1.65'
run: rustup target add x86_64-fuchsia

- run: cargo check --workspace --release -vv --all-targets
Expand All @@ -129,13 +126,13 @@ jobs:
- run: cargo check --workspace --release -vv --target=x86_64-apple-darwin --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-freebsd --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-netbsd --features=all-apis --all-targets
- if: matrix.rust != '1.63'
- if: matrix.rust != '1.65'
run: cargo check --workspace --release -vv --target=wasm32-wasip1 --features=all-apis
- if: matrix.rust != '1.63'
- if: matrix.rust != '1.65'
run: cargo check --workspace --release -vv --target=wasm32-wasip2 --features=all-apis
- if: matrix.rust != '1.63'
- if: matrix.rust != '1.65'
run: cargo check --workspace --release -vv --target=x86_64-unknown-fuchsia --features=all-apis --all-targets
- if: matrix.rust == '1.63'
- if: matrix.rust == '1.65'
run: cargo check --workspace --release -vv --target=x86_64-fuchsia --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-illumos --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-gnu --features=all-apis --all-targets
Expand Down Expand Up @@ -291,14 +288,14 @@ jobs:
powerpc-linux-stable,
powerpc64le-linux-stable,
arm-linux-stable,
ubuntu-1.63,
i686-linux-1.63,
aarch64-linux-1.63,
riscv64-linux-1.63,
s390x-linux-1.63,
ubuntu-1.65,
i686-linux-1.65,
aarch64-linux-1.65,
riscv64-linux-1.65,
s390x-linux-1.65,
powerpc64le-linux,
powerpc64le-linux-1.63,
arm-linux-1.63,
powerpc64le-linux-1.65,
arm-linux-1.65,
macos-latest,
macos-15-intel,
macos-14,
Expand Down Expand Up @@ -437,64 +434,64 @@ jobs:
qemu: qemu-arm
qemu_args: -L /usr/arm-linux-gnueabi
qemu_target: arm-linux-user
- build: ubuntu-1.63
- build: ubuntu-1.65
os: ubuntu-latest
rust: 1.63
- build: i686-linux-1.63
rust: 1.65
- build: i686-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: i686-unknown-linux-gnu
gcc_package: gcc-i686-linux-gnu
gcc: i686-linux-gnu-gcc
libc_package: libc-dev-i386-cross
- build: aarch64-linux-1.63
- build: aarch64-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: aarch64-unknown-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
qemu: qemu-aarch64
qemu_args: -L /usr/aarch64-linux-gnu
qemu_target: aarch64-linux-user
- build: riscv64-linux-1.63
- build: riscv64-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: riscv64gc-unknown-linux-gnu
gcc_package: gcc-riscv64-linux-gnu
gcc: riscv64-linux-gnu-gcc
qemu: qemu-riscv64
qemu_args: -L /usr/riscv64-linux-gnu
qemu_target: riscv64-linux-user
- build: s390x-linux-1.63
- build: s390x-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: s390x-unknown-linux-gnu
gcc_package: gcc-s390x-linux-gnu
gcc: s390x-linux-gnu-gcc
qemu: qemu-s390x
qemu_args: -L /usr/s390x-linux-gnu
qemu_target: s390x-linux-user
- build: powerpc-linux-1.63
- build: powerpc-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: powerpc-unknown-linux-gnu
gcc_package: gcc-powerpc-linux-gnu
gcc: powerpc-linux-gnu-gcc
qemu: qemu-ppc
qemu_args: -L /usr/powerpc-linux-gnu
qemu_target: ppc-linux-user
- build: powerpc64le-linux-1.63
- build: powerpc64le-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: powerpc64le-unknown-linux-gnu
gcc_package: gcc-powerpc64le-linux-gnu
gcc: powerpc64le-linux-gnu-gcc
qemu: qemu-ppc64le
qemu_args: -L /usr/powerpc64le-linux-gnu
qemu_target: ppc64le-linux-user
- build: arm-linux-1.63
- build: arm-linux-1.65
os: ubuntu-latest
rust: 1.63
rust: 1.65
target: armv5te-unknown-linux-gnueabi
gcc_package: gcc-arm-linux-gnueabi
gcc: arm-linux-gnueabi-gcc
Expand Down Expand Up @@ -585,19 +582,16 @@ jobs:
ninja -C build install
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'

- name: Use specific dependency versions for Rust 1.63 compatibility.
if: matrix.rust == '1.63'
- name: Use specific dependency versions for Rust 1.65 compatibility.
if: matrix.rust == '1.65'
run: |
cargo update --package=dashmap --precise 5.4.0
cargo update --package=regex --precise=1.9.0
cargo update --package=half --precise=2.2.1
cargo update --package=flate2 --precise=1.0.35
cargo update --package=syn --precise=2.0.106
cargo update --package=textwrap --precise=0.16.1
cargo update --package=once_cell --precise=1.20.3
cargo update --package=parking_lot --precise=0.12.3
cargo update --package=parking_lot_core --precise=0.9.10
cargo update --package=lock_api --precise=0.4.12
cargo update --package=parking_lot --precise=0.12.4
cargo update --package=parking_lot_core --precise=0.9.11
cargo update --package=lock_api --precise=0.4.13
cargo update --package=rayon --precise=1.10.0
cargo update --package=rayon-core --precise=1.12.1
cargo update --package=windows-sys --precise=0.60.2
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2021"
keywords = ["api", "file", "network", "safe", "syscall"]
categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"]
include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md", "benches"]
rust-version = "1.63"
rust-version = "1.65"

[hints]
# Most users use a fraction of the rustix API surface area, so this reduces compilation times
Expand Down Expand Up @@ -268,7 +268,6 @@ check-cfg = [
'cfg(rustc_diagnostics)',
'cfg(solarish)',
'cfg(staged_api)',
'cfg(static_assertions)',
'cfg(thumb_mode)',
'cfg(wasi)',
'cfg(wasi_ext)',
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ more portable APIs built on this functionality, see the [`cap-std`], [`memfd`],

* linux_raw, which uses raw Linux system calls and vDSO calls, and is
supported on Linux on x86-64, x86, aarch64, riscv64gc, powerpc64le,
arm (v5 onwards), mipsel, and mips64el, with stable, nightly, and 1.63 Rust.
arm (v5 onwards), mipsel, and mips64el, with stable, nightly, and 1.65 Rust.
- By being implemented entirely in Rust, avoiding `libc`, `errno`, and pthread
cancellation, and employing some specialized optimizations, most functions
compile down to very efficient code, which can often be fully inlined into
Expand Down Expand Up @@ -157,9 +157,11 @@ safety types rather than `RawFd`, and the flags parameters to functions such as

## Minimum Supported Rust Version (MSRV)

This crate currently works on the version of [Rust on Debian stable], which is
currently [Rust 1.63]. This policy may change in the future, in minor version
releases, so users using a fixed version of Rust should pin to a specific
This crate has a Minimum Supported Rust Version (MSRV) of [Rust 1.65].

The MSRV may change in future minor versions; however, the current policy is
that it will not be increased beyond the version of [Rust on Debian stable].
Users who rely on a fixed version of Rust should pin to a specific
version of this crate.

## Minimum Linux Version
Expand All @@ -172,7 +174,7 @@ The specifics of this policy may change in the future, but we intend it to
always reflect “very old” Linux versions.

[MSRV]: #minimum-supported-rust-version-msrv
[Rust 1.63]: https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html
[Rust 1.65]: https://blog.rust-lang.org/2022/11/03/Rust-1.65.0/
[any current Rust target]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
[kernel.org]: https://www.kernel.org/releases.html
[Rust on Debian stable]: https://packages.debian.org/stable/rust/rustc
Expand Down
10 changes: 0 additions & 10 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ fn main() {
use_feature_or_nothing("error_in_core");
}

// Feature needed for testing.
if use_static_assertions() {
use_feature("static_assertions");
}

// `LowerExp`/`UpperExp` for `NonZeroI32` etc.
if has_lower_upper_exp_for_non_zero() {
use_feature("lower_upper_exp_for_non_zero");
Expand Down Expand Up @@ -197,11 +192,6 @@ fn main() {
println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI");
}

fn use_static_assertions() -> bool {
// `offset_from` was made const in Rust 1.65.
can_compile("const unsafe fn foo(p: *const u8) -> isize { p.offset_from(p) }")
}

fn use_thumb_mode() -> bool {
// In thumb mode, r7 is reserved.
!can_compile("pub unsafe fn f() { core::arch::asm!(\"udf #16\", in(\"r7\") 0); }")
Expand Down
7 changes: 1 addition & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,10 @@ extern crate rustc_std_workspace_alloc as alloc;
#[cfg(all(feature = "alloc", not(feature = "rustc-dep-of-std")))]
extern crate alloc;

// Use `static_assertions` macros if we have them, or a polyfill otherwise.
#[cfg(all(test, static_assertions))]
#[cfg(test)]
#[macro_use]
#[allow(unused_imports)]
extern crate static_assertions;
#[cfg(all(test, not(static_assertions)))]
#[macro_use]
#[allow(unused_imports)]
mod static_assertions;

pub mod buffer;
#[cfg(not(windows))]
Expand Down
36 changes: 0 additions & 36 deletions src/static_assertions.rs

This file was deleted.

Loading