Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport patches to 0.36 #877

Merged
merged 6 commits into from
Oct 12, 2023
Merged
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
172 changes: 20 additions & 152 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
rust: stable
- build: nightly
os: ubuntu-latest
rust: nightly-2023-07-03
rust: nightly
- build: 1.48
os: ubuntu-latest
rust: 1.48
Expand Down Expand Up @@ -62,12 +62,9 @@ jobs:
i686-unknown-linux-gnu
i686-unknown-linux-musl
wasm32-unknown-emscripten
riscv64gc-unknown-linux-gnu
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
powerpc64le-unknown-linux-gnu
mipsel-unknown-linux-gnu
mips64el-unknown-linux-gnuabi64
armv5te-unknown-linux-gnueabi
s390x-unknown-linux-gnu
arm-linux-androideabi
Expand All @@ -85,7 +82,7 @@ jobs:
run: |
set -ex
sudo apt-get update
sudo apt-get install -y gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu gcc-arm-linux-gnueabi musl-tools
sudo apt-get install -y gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi musl-tools

- name: Use specific dependency versions for Rust 1.48 compatibility.
if: matrix.rust == '1.48'
Expand All @@ -99,6 +96,7 @@ jobs:
cargo update --package=io-lifetimes --precise 1.0.6
cd - >/dev/null
done
cargo update --package=tempfile --precise=3.6.0

- run: cargo check --workspace --release -vv --all-targets
- run: cargo check --workspace --release -vv --features=all-apis --all-targets
Expand All @@ -121,13 +119,10 @@ jobs:
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-musl --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-musl --features=use-libc,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=wasm32-unknown-emscripten --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=riscv64gc-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=use-libc,all-apis --all-targets
- run: cargo check --workspace --release -vv --target=powerpc64le-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=mipsel-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=mips64el-unknown-linux-gnuabi64 --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=armv5te-unknown-linux-gnueabi --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=s390x-unknown-linux-gnu --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=arm-linux-androideabi --features=all-apis --all-targets
Expand All @@ -149,7 +144,7 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly-2023-07-03
rust: nightly

env:
# -D warnings is commented out in our install-rust action; re-add it here.
Expand All @@ -173,7 +168,7 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly-2023-07-03
rust: nightly

steps:
- uses: actions/checkout@v3
Expand All @@ -200,7 +195,7 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly-2023-07-03
rust: nightly

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -232,24 +227,24 @@ jobs:
QEMU_BUILD_VERSION: 7.0.0
strategy:
matrix:
build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, ubuntu-1.48, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, mipsel-linux-stable, mips64el-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.48, i686-linux-1.48, aarch64-linux-1.48, riscv64-linux-1.48, s390x-linux-1.48, mipsel-linux-1.48, mips64el-linux-1.48, powerpc64le-linux-1.48, arm-linux-1.48, macos-latest, macos-11, windows, windows-2019]
build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, s390x-linux, arm-linux, ubuntu-stable, ubuntu-1.48, i686-linux-stable, aarch64-linux-stable, s390x-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.48, i686-linux-1.48, aarch64-linux-1.48, s390x-linux-1.48, powerpc64le-linux-1.48, arm-linux-1.48, macos-latest, macos-11, windows, windows-2019]
include:
- build: ubuntu
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
- build: ubuntu-20.04
os: ubuntu-20.04
rust: nightly-2023-07-03
rust: nightly
- build: i686-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
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
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
target: aarch64-unknown-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
Expand All @@ -258,43 +253,16 @@ jobs:
qemu_target: aarch64-linux-user
- build: powerpc64le-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
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: mips64el-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
qemu: qemu-mips64el
qemu_args: -L /usr/mips64el-linux-gnuabi64
qemu_target: mips64el-linux-user
- build: mipsel-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
qemu: qemu-mipsel
qemu_args: -L /usr/mipsel-linux-gnu
qemu_target: mipsel-linux-user
- build: riscv64-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
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
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
target: s390x-unknown-linux-gnu
gcc_package: gcc-s390x-linux-gnu
gcc: s390x-linux-gnu-gcc
Expand All @@ -303,7 +271,7 @@ jobs:
qemu_target: s390x-linux-user
- build: arm-linux
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: nightly-2023-07-03
rust: nightly
target: armv5te-unknown-linux-gnueabi
gcc_package: gcc-arm-linux-gnueabi
gcc: arm-linux-gnueabi-gcc
Expand All @@ -329,15 +297,6 @@ jobs:
qemu: qemu-aarch64
qemu_args: -L /usr/aarch64-linux-gnu
qemu_target: aarch64-linux-user
- build: riscv64-linux-stable
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: stable
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-stable
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: stable
Expand All @@ -356,24 +315,6 @@ jobs:
qemu: qemu-ppc64le
qemu_args: -L /usr/powerpc64le-linux-gnu
qemu_target: ppc64le-linux-user
- build: mips64el-linux-stable
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: stable
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
qemu: qemu-mips64el
qemu_args: -L /usr/mips64el-linux-gnuabi64
qemu_target: mips64el-linux-user
- build: mipsel-linux-stable
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: stable
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
qemu: qemu-mipsel
qemu_args: -L /usr/mipsel-linux-gnu
qemu_target: mipsel-linux-user
- build: arm-linux-stable
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: stable
Expand Down Expand Up @@ -402,15 +343,6 @@ jobs:
qemu: qemu-aarch64
qemu_args: -L /usr/aarch64-linux-gnu
qemu_target: aarch64-linux-user
- build: riscv64-linux-1.48
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: 1.48
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.48
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: 1.48
Expand All @@ -429,24 +361,6 @@ jobs:
qemu: qemu-ppc64le
qemu_args: -L /usr/powerpc64le-linux-gnu
qemu_target: ppc64le-linux-user
- build: mips64el-linux-1.48
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: 1.48
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
qemu: qemu-mips64el
qemu_args: -L /usr/mips64el-linux-gnuabi64
qemu_target: mips64el-linux-user
- build: mipsel-linux-1.48
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: 1.48
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
qemu: qemu-mipsel
qemu_args: -L /usr/mipsel-linux-gnu
qemu_target: mipsel-linux-user
- build: arm-linux-1.48
os: ubuntu-20.04 # TODO: remove pin when fixed (#483)
rust: 1.48
Expand All @@ -464,10 +378,10 @@ jobs:
rust: stable
- build: windows
os: windows-latest
rust: nightly-2023-07-03
rust: nightly
- build: windows-2019
os: windows-2019
rust: nightly-2023-07-03
rust: nightly
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -537,6 +451,7 @@ jobs:
cargo update --package=io-lifetimes --precise 1.0.6
cd - >/dev/null
done
cargo update --package=tempfile --precise=3.6.0

- run: |
# Run the tests, and check the prebuilt release libraries.
Expand Down Expand Up @@ -575,7 +490,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, mips64el-linux, mipsel-linux, riscv64-linux, arm-linux]
build: [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, arm-linux]
include:
- build: ubuntu
os: ubuntu-latest
Expand Down Expand Up @@ -605,33 +520,6 @@ jobs:
qemu: qemu-ppc64le
qemu_args: -L /usr/powerpc64le-linux-gnu
qemu_target: ppc64le-linux-user
- build: mips64el-linux
os: ubuntu-latest
rust: stable
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
qemu: qemu-mips64el
qemu_args: -L /usr/mips64el-linux-gnuabi64
qemu_target: mips64el-linux-user
- build: mipsel-linux
os: ubuntu-latest
rust: stable
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
qemu: qemu-mipsel
qemu_args: -L /usr/mipsel-linux-gnu
qemu_target: mipsel-linux-user
- build: riscv64-linux
os: ubuntu-latest
rust: stable
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: arm-linux
os: ubuntu-latest
rust: stable
Expand Down Expand Up @@ -712,42 +600,22 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [powerpc64le-linux, mipsel-linux, mips64el-linux]
build: [powerpc64le-linux]
include:
- build: powerpc64le-linux
os: ubuntu-latest
rust: nightly-2023-07-03
rust: nightly
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: mips64el-linux
os: ubuntu-latest
rust: nightly-2023-07-03
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
qemu: qemu-mips64el
qemu_args: -L /usr/mips64el-linux-gnuabi64
qemu_target: mips64el-linux-user
- build: mipsel-linux
os: ubuntu-latest
rust: nightly-2023-07-03
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
qemu: qemu-mipsel
qemu_args: -L /usr/mipsel-linux-gnu
qemu_target: mipsel-linux-user
env:
# -D warnings is commented out in our install-rust action; re-add it here.
RUSTFLAGS: --cfg rustix_use_experimental_asm -D warnings
RUSTDOCFLAGS: --cfg rustix_use_experimental_asm
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUSTFLAGS: --cfg rustix_use_experimental_asm
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUSTFLAGS: --cfg rustix_use_experimental_asm
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUSTFLAGS: --cfg rustix_use_experimental_asm
QEMU_BUILD_VERSION: 7.0.0
steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 0 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,12 @@ tempfile = "3.2.0"
libc = "0.2.133"
libc_errno = { package = "errno", version = "0.3.0", default-features = false }
io-lifetimes = { version = "1.0.0", default-features = false, features = ["close"] }
# Don't upgrade to serial_test 0.7 for now because it depends on a
# `parking_lot_core` version which is not compatible with our MSRV of 1.48.
serial_test = "0.6"
memoffset = "0.7.1"
flate2 = "1.0"

[target.'cfg(all(criterion, not(any(target_os = "emscripten", target_os = "wasi"))))'.dev-dependencies]
criterion = "0.4"

[target.'cfg(windows)'.dev-dependencies]
ctor = "0.1.21"

# Add Criterion configuration, as described here:
# <https://bheisler.github.io/criterion.rs/book/getting_started.html#step-1---add-dependency-to-cargotoml>
[[bench]]
name = "mod"
harness = false

[package.metadata.docs.rs]
features = ["all-apis"]
rustdoc-args = ["--cfg", "doc_cfg"]
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ by default. The rest of the API is conditional with cargo feature flags:

## Similar crates

`rustix` is similar to [`nix`], [`simple_libc`], [`unix`], [`nc`], and
[`uapi`]. `rustix` is architected for [I/O safety] with most APIs using
`rustix` is similar to [`nix`], [`simple_libc`], [`unix`], [`nc`], [`uapi`],
and [`rusl`]. `rustix` is architected for [I/O safety] with most APIs using
[`OwnedFd`] and [`AsFd`] to manipulate file descriptors rather than `File` or
even `c_int`, and supporting multiple backends so that it can use direct
syscalls while still being usable on all platforms `libc` supports. Like `nix`,
Expand Down Expand Up @@ -136,6 +136,7 @@ version of this crate.
[`nc`]: https://crates.io/crates/nc
[`simple_libc`]: https://crates.io/crates/simple_libc
[`uapi`]: https://crates.io/crates/uapi
[`rusl`]: https://lib.rs/crates/rusl
[`relibc`]: https://github.com/redox-os/relibc
[`syscall`]: https://crates.io/crates/syscall
[`sc`]: https://crates.io/crates/sc
Expand Down
Loading