Skip to content

Commit 64f472c

Browse files
committed
fix: use portable-atomic for 64-bit atomics
`std::sync::atomic::{AtomicU64, AtomicI64}` are not available on some tier 2 32-bit platforms. Replace them with `portable_atomic`, which is already a transitive dependency via `gix` and `jiff` See * https://triage.rust-lang.org/gha-logs/rust-lang/rust/71938527712 * rust-lang/rust#155470 (comment)
1 parent 6ea2e71 commit 64f472c

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ openssl-src = "=300.5.4"
8484
os_info = { version = "3.14.0", default-features = false }
8585
pasetors = { version = "0.7.8", features = ["v3", "paserk", "std", "serde"] }
8686
pathdiff = "0.2.3"
87+
portable-atomic = "1.13.1"
8788
percent-encoding = "2.3.2"
8889
proptest = "1.11.0"
8990
pulldown-cmark = { version = "0.13.3", default-features = false, features = ["html"] }
@@ -204,6 +205,7 @@ opener.workspace = true
204205
os_info.workspace = true
205206
pasetors.workspace = true
206207
pathdiff.workspace = true
208+
portable-atomic.workspace = true
207209
rand.workspace = true
208210
regex.workspace = true
209211
rusqlite = { workspace = true, features = ["fallible_uint"] }

src/cargo/util/network/http_async.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use std::io::Cursor;
88
use std::io::Read;
99
use std::str::FromStr;
1010
use std::sync::Arc;
11-
use std::sync::atomic::AtomicI64;
12-
use std::sync::atomic::AtomicU64;
1311
use std::sync::atomic::Ordering;
1412
use std::sync::mpsc;
1513
use std::sync::mpsc::Receiver;
@@ -25,6 +23,8 @@ use curl::easy::WriteError;
2523
use curl::multi::Easy2Handle;
2624
use curl::multi::Multi;
2725
use futures::channel::oneshot;
26+
use portable_atomic::AtomicI64;
27+
use portable_atomic::AtomicU64;
2828
use tracing::{debug, error, trace, warn};
2929

3030
use crate::util::network::http::HandleConfiguration;

0 commit comments

Comments
 (0)