Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@ jobs:
matrix:
# macOS is tested on Cirrus CI due to GitHub-hosted macOS runners are slow.
include:
- rust: '1.63'
- rust: '1.74'
os: ubuntu-latest
- rust: '1.63'
os: ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved
- rust: '1.63'
- rust: '1.74'
os: ubuntu-24.04-arm
- rust: '1.74'
os: windows-latest
- rust: stable
os: ubuntu-latest
- rust: stable
os: ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved
os: ubuntu-24.04-arm
- rust: stable
os: windows-latest
- rust: nightly
os: ubuntu-latest
- rust: nightly
os: ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved
os: ubuntu-24.04-arm
- rust: nightly
os: windows-latest
- rust: nightly
os: ubuntu-latest
target: i686-unknown-linux-gnu
- rust: nightly
os: ubuntu-22.04-arm # TODO: update to 24.04 when https://github.com/rust-lang/rust/issues/135867 solved
os: ubuntu-24.04-arm
target: armv7-unknown-linux-gnueabihf
# Test 32-bit target that does not have AtomicU64/AtomicI64.
- rust: nightly
Expand Down Expand Up @@ -193,6 +193,9 @@ jobs:
group:
- channel
- others
miriflags:
- ''
- '-Zmiri-tree-borrows'
runs-on: ubuntu-latest
timeout-minutes: 120 # TODO
steps:
Expand All @@ -203,6 +206,8 @@ jobs:
component: miri
- name: miri
run: ci/miri.sh ${{ matrix.group }}
env:
MIRIFLAGS: ${{ matrix.miriflags }}

# Run cargo-careful.
careful:
Expand All @@ -228,8 +233,6 @@ jobs:
uses: taiki-e/github-actions/install-rust@nightly
with:
component: rust-src
# https://github.com/google/sanitizers/issues/1716 / https://github.com/actions/runner-images/issues/9491
- run: sudo sysctl vm.mmap_rnd_bits=28
- name: Run sanitizers
run: ci/san.sh

Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ name = "crossbeam"
# - Run './tools/publish.sh crossbeam <version>'
version = "0.8.4"
edition = "2021"
rust-version = "1.61"
# NB: Sync with msrv badge and "Compatibility" section in README.md
rust-version = "1.74"
license = "MIT OR Apache-2.0"
repository = "https://github.com/crossbeam-rs/crossbeam"
homepage = "https://github.com/crossbeam-rs/crossbeam"
Expand Down Expand Up @@ -73,3 +74,4 @@ unreachable_pub = "warn"
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
incompatible_msrv = { level = "allow", priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920
manual_map = { level = "allow", priority = 1 }
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://github.com/crossbeam-rs/crossbeam#license)
https://crates.io/crates/crossbeam)
[![Documentation](https://docs.rs/crossbeam/badge.svg)](
https://docs.rs/crossbeam)
[![Rust 1.61+](https://img.shields.io/badge/rust-1.61+-lightgray.svg)](
[![Rust 1.74+](https://img.shields.io/badge/rust-1.74+-lightgray.svg)](
https://www.rust-lang.org)
[![chat](https://img.shields.io/discord/569610676205781012.svg?logo=discord)](https://discord.com/invite/JXYwgWZ)

Expand Down Expand Up @@ -94,7 +94,7 @@ crossbeam = "0.8"

Crossbeam supports stable Rust releases going back at least six months,
and every time the minimum supported Rust version is increased, a new minor
version is released. Currently, the minimum supported Rust version is 1.61.
version is released. Currently, the minimum supported Rust version is 1.74.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions ci/check-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ cd "$(dirname "$0")"/..
# * `--exclude benchmarks` - benchmarks doesn't published.
if [[ "${RUST_VERSION}" == "msrv" ]]; then
cargo hack build --all --feature-powerset --no-dev-deps --exclude crossbeam-utils --exclude benchmarks --rust-version
# atomic feature requires Rust 1.60.
# atomic feature requires Rust 1.74.
cargo hack build -p crossbeam-utils --feature-powerset --no-dev-deps --rust-version --exclude-features atomic
cargo +1.60 hack build -p crossbeam-utils --feature-powerset --no-dev-deps
cargo +1.74 hack build -p crossbeam-utils --feature-powerset --no-dev-deps
else
cargo hack build --all --feature-powerset --no-dev-deps --exclude benchmarks
fi
Expand Down
8 changes: 2 additions & 6 deletions ci/miri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ case "${group}" in
others)
cargo miri test --all-features \
-p crossbeam-queue \
-p crossbeam-utils 2>&1 | ts -i '%.s '
# Use Tree Borrows instead of Stacked Borrows because epoch is not compatible with Stacked Borrows: https://github.com/crossbeam-rs/crossbeam/issues/545#issuecomment-1192785003
MIRIFLAGS="${MIRIFLAGS} -Zmiri-tree-borrows" \
cargo miri test --all-features \
-p crossbeam-epoch \
-p crossbeam-utils \
-p crossbeam-skiplist \
-p crossbeam 2>&1 | ts -i '%.s '
# Use Tree Borrows instead of Stacked Borrows because epoch is not compatible with Stacked Borrows: https://github.com/crossbeam-rs/crossbeam/issues/545#issuecomment-1192785003
# -Zmiri-compare-exchange-weak-failure-rate=0.0 is needed because some sequential tests (e.g.,
# doctest of Stealer::steal) incorrectly assume that sequential weak CAS will never fail.
# -Zmiri-preemption-rate=0 is needed because this code technically has UB and Miri catches that.
MIRIFLAGS="${MIRIFLAGS} -Zmiri-tree-borrows -Zmiri-compare-exchange-weak-failure-rate=0.0 -Zmiri-preemption-rate=0" \
MIRIFLAGS="${MIRIFLAGS} -Zmiri-compare-exchange-weak-failure-rate=0.0 -Zmiri-preemption-rate=0" \
cargo miri test --all-features \
-p crossbeam-deque 2>&1 | ts -i '%.s '
;;
Expand Down
3 changes: 2 additions & 1 deletion crossbeam-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ name = "crossbeam-channel"
# - Run './tools/publish.sh crossbeam-channel <version>'
version = "0.5.15"
edition = "2021"
rust-version = "1.60"
# NB: Sync with msrv badge and "Compatibility" section in README.md
rust-version = "1.74"
license = "MIT OR Apache-2.0"
repository = "https://github.com/crossbeam-rs/crossbeam"
homepage = "https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-channel"
Expand Down
4 changes: 2 additions & 2 deletions crossbeam-channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-channel#license)
https://crates.io/crates/crossbeam-channel)
[![Documentation](https://docs.rs/crossbeam-channel/badge.svg)](
https://docs.rs/crossbeam-channel)
[![Rust 1.60+](https://img.shields.io/badge/rust-1.60+-lightgray.svg)](
[![Rust 1.74+](https://img.shields.io/badge/rust-1.74+-lightgray.svg)](
https://www.rust-lang.org)
[![chat](https://img.shields.io/discord/569610676205781012.svg?logo=discord)](https://discord.com/invite/JXYwgWZ)

Expand Down Expand Up @@ -48,7 +48,7 @@ crossbeam-channel = "0.5"

Crossbeam Channel supports stable Rust releases going back at least six months,
and every time the minimum supported Rust version is increased, a new minor
version is released. Currently, the minimum supported Rust version is 1.60.
version is released. Currently, the minimum supported Rust version is 1.74.

## License

Expand Down
3 changes: 2 additions & 1 deletion crossbeam-deque/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ name = "crossbeam-deque"
# - Run './tools/publish.sh crossbeam-deque <version>'
version = "0.8.6"
edition = "2021"
rust-version = "1.61"
# NB: Sync with msrv badge and "Compatibility" section in README.md
rust-version = "1.74"
license = "MIT OR Apache-2.0"
repository = "https://github.com/crossbeam-rs/crossbeam"
homepage = "https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-deque"
Expand Down
4 changes: 2 additions & 2 deletions crossbeam-deque/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-deque#license)
https://crates.io/crates/crossbeam-deque)
[![Documentation](https://docs.rs/crossbeam-deque/badge.svg)](
https://docs.rs/crossbeam-deque)
[![Rust 1.61+](https://img.shields.io/badge/rust-1.61+-lightgray.svg)](
[![Rust 1.74+](https://img.shields.io/badge/rust-1.74+-lightgray.svg)](
https://www.rust-lang.org)
[![chat](https://img.shields.io/discord/569610676205781012.svg?logo=discord)](https://discord.com/invite/JXYwgWZ)

Expand All @@ -28,7 +28,7 @@ crossbeam-deque = "0.8"

Crossbeam Deque supports stable Rust releases going back at least six months,
and every time the minimum supported Rust version is increased, a new minor
version is released. Currently, the minimum supported Rust version is 1.61.
version is released. Currently, the minimum supported Rust version is 1.74.

## License

Expand Down
6 changes: 3 additions & 3 deletions crossbeam-deque/src/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ impl<T> Stealer<T> {
}

// Reserve capacity for the stolen batch.
let batch_size = cmp::min((len as usize + 1) / 2, limit);
let batch_size = cmp::min((len as usize).div_ceil(2), limit);
dest.reserve(batch_size);
let mut batch_size = batch_size as isize;

Expand Down Expand Up @@ -1623,7 +1623,7 @@ impl<T> Injector<T> {
} else {
let len = (tail - head) >> SHIFT;
// Steal half of the available tasks.
advance = ((len + 1) / 2).min(limit);
advance = len.div_ceil(2).min(limit);
}
} else {
// We can steal all tasks till the end of the block.
Expand Down Expand Up @@ -1820,7 +1820,7 @@ impl<T> Injector<T> {
} else {
let len = (tail - head) >> SHIFT;
// Steal half of the available tasks.
advance = ((len + 1) / 2).min(limit);
advance = len.div_ceil(2).min(limit);
}
} else {
// We can steal all tasks till the end of the block.
Expand Down
3 changes: 2 additions & 1 deletion crossbeam-epoch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ name = "crossbeam-epoch"
# - Run './tools/publish.sh crossbeam-epoch <version>'
version = "0.9.18"
edition = "2021"
rust-version = "1.61"
# NB: Sync with msrv badge and "Compatibility" section in README.md
rust-version = "1.74"
license = "MIT OR Apache-2.0"
repository = "https://github.com/crossbeam-rs/crossbeam"
homepage = "https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-epoch"
Expand Down
4 changes: 2 additions & 2 deletions crossbeam-epoch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-epoch#license)
https://crates.io/crates/crossbeam-epoch)
[![Documentation](https://docs.rs/crossbeam-epoch/badge.svg)](
https://docs.rs/crossbeam-epoch)
[![Rust 1.61+](https://img.shields.io/badge/rust-1.61+-lightgray.svg)](
[![Rust 1.74+](https://img.shields.io/badge/rust-1.74+-lightgray.svg)](
https://www.rust-lang.org)
[![chat](https://img.shields.io/discord/569610676205781012.svg?logo=discord)](https://discord.com/invite/JXYwgWZ)

Expand All @@ -35,7 +35,7 @@ crossbeam-epoch = "0.9"

Crossbeam Epoch supports stable Rust releases going back at least six months,
and every time the minimum supported Rust version is increased, a new minor
version is released. Currently, the minimum supported Rust version is 1.61.
version is released. Currently, the minimum supported Rust version is 1.74.

## License

Expand Down
Loading
Loading