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

Adapt aio to the world of async/await, and fix some potential unsound… #1440

Merged
merged 1 commit into from
May 31, 2021
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
14 changes: 7 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ task:
image: freebsd-11-4-release-amd64
setup_script:
- fetch https://sh.rustup.rs -o rustup.sh
- sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0
- sh rustup.sh -y --profile=minimal --default-toolchain 1.41.0
- $HOME/.cargo/bin/rustup target add i686-unknown-freebsd
amd64_test_script:
- . $HOME/.cargo/env
Expand Down Expand Up @@ -46,7 +46,7 @@ task:
image: catalina-xcode
setup_script:
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
- sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0
- sh rustup.sh -y --profile=minimal --default-toolchain 1.41.0
- . $HOME/.cargo/env
- bash ci/install.sh
script:
Expand Down Expand Up @@ -101,7 +101,7 @@ task:
setup_script:
- mkdir /tmp/home
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
- sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0
- sh rustup.sh -y --profile=minimal --default-toolchain 1.41.0
- . $HOME/.cargo/env
- bash ci/install.sh
script:
Expand All @@ -119,13 +119,13 @@ task:
- name: Linux x86_64
env:
TARGET: x86_64-unknown-linux-gnu
TOOLCHAIN: 1.40.0
TOOLCHAIN: 1.41.0
- name: Linux x86_64 musl
env:
TARGET: x86_64-unknown-linux-musl
TOOLCHAIN: 1.40.0
TOOLCHAIN: 1.41.0
container:
image: rust:1.40
image: rust:1.41
setup_script:
- rustup toolchain install $TOOLCHAIN
- rustup target add --toolchain $TOOLCHAIN $TARGET
Expand Down Expand Up @@ -173,7 +173,7 @@ task:
env:
TARGET: x86_64-fuchsia
container:
image: rust:1.40
image: rust:1.41
setup_script:
- rustup target add $TARGET
script:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1429](https://github.com/nix-rust/nix/pull/1429))
- Made `Uid::is_root` a `const fn`
(#[1429](https://github.com/nix-rust/nix/pull/1429))
- `AioCb` is now always pinned. Once a `libc::aiocb` gets sent to the kernel,
its address in memory must not change. Nix now enforces that by using
`std::pin`. Most users won't need to change anything, except when using
`aio_suspend`. See that method's documentation for the new usage.
(#[1440](https://github.com/nix-rust/nix/pull/1440))
- `LioCb` is now constructed using a distinct `LioCbBuilder` struct. This
avoids a soundness issue with the old `LioCb`. Usage is similar but
construction now uses the builder pattern. See the documentation for
details.
(#[1440](https://github.com/nix-rust/nix/pull/1440))
- Minimum supported Rust version is now 1.41.0.
([#1440](https://github.com/nix-rust/nix/pull/1440))

### Fixed
- Allow `sockaddr_ll` size, as reported by the Linux kernel, to be smaller then it's definition
Expand All @@ -28,6 +40,11 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Removed `sys::socket::accept4` from Android arm because libc removed it in
version 0.2.87.
([#1399](https://github.com/nix-rust/nix/pull/1399))
- `AioCb::from_boxed_slice` and `AioCb::from_boxed_mut_slice` have been
removed. They were useful with earlier versions of Rust, but should no
longer be needed now that async/await are available. `AioCb`s now work
exclusively with borrowed buffers, not owned ones.
(#[1440](https://github.com/nix-rust/nix/pull/1440))

## [0.20.0] - 20 February 2021
### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ memoffset = "0.6.3"
cc = "1"

[dev-dependencies]
bytes = "0.4.8"
assert-impl = "0.1"
lazy_static = "1.2"
rand = "0.8"
tempfile = "3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Tier 3:

## Usage

`nix` requires Rust 1.40.0 or newer.
`nix` requires Rust 1.41.0 or newer.

To use `nix`, add this to your `Cargo.toml`:

Expand Down
Loading