summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsilvanshade <silvanshade@users.noreply.github.com>2024-06-18 15:07:41 -0600
committerJack O'Connor <oconnor663@gmail.com>2024-07-03 12:27:14 -0400
commit648a06043a6c29bc34c7bc68384054b75340ec88 (patch)
tree0a04d7a7cbb85a531b049c3eb19a42092b069920
parentc8834c24a67763cc0fb097316a8d29d38888c9c8 (diff)
Switch to rayon-core for faster build
-rw-r--r--Cargo.toml4
-rw-r--r--b3sum/Cargo.lock20
-rw-r--r--b3sum/Cargo.toml2
-rw-r--r--b3sum/src/main.rs2
-rw-r--r--src/join.rs2
5 files changed, 7 insertions, 23 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 7011213..eee0712 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ std = []
# `update_rayon` and (in combination with `mmap` below) `update_mmap_rayon`
# methods, for multithreaded hashing. However, even if this feature is enabled,
# all other APIs remain single-threaded.
-rayon = ["dep:rayon", "std"]
+rayon = ["dep:rayon-core", "std"]
# The `mmap` feature (disabled by default, but enabled for docs.rs) adds the
# `update_mmap` and (in combination with `rayon` above) `update_mmap_rayon`
@@ -98,7 +98,7 @@ constant_time_eq = "0.3.0"
cfg-if = "1.0.0"
digest = { version = "0.10.1", features = [ "mac" ], optional = true }
memmap2 = { version = "0.9", optional = true }
-rayon = { version = "1.2.1", optional = true }
+rayon-core = { version = "1.12.1", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"], optional = true }
diff --git a/b3sum/Cargo.lock b/b3sum/Cargo.lock
index 2300d3b..4302772 100644
--- a/b3sum/Cargo.lock
+++ b/b3sum/Cargo.lock
@@ -77,7 +77,7 @@ dependencies = [
"clap",
"duct",
"hex",
- "rayon",
+ "rayon-core",
"tempfile",
"wild",
]
@@ -98,7 +98,7 @@ dependencies = [
"cfg-if",
"constant_time_eq",
"memmap2",
- "rayon",
+ "rayon-core",
]
[[package]]
@@ -204,12 +204,6 @@ dependencies = [
]
[[package]]
-name = "either"
-version = "1.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
-
-[[package]]
name = "errno"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -299,16 +293,6 @@ dependencies = [
]
[[package]]
-name = "rayon"
-version = "1.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
-dependencies = [
- "either",
- "rayon-core",
-]
-
-[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/b3sum/Cargo.toml b/b3sum/Cargo.toml
index 812ed22..3b47beb 100644
--- a/b3sum/Cargo.toml
+++ b/b3sum/Cargo.toml
@@ -18,7 +18,7 @@ anyhow = "1.0.25"
blake3 = { version = "1", path = "..", features = ["mmap", "rayon"] }
clap = { version = "4.0.8", features = ["derive", "wrap_help"] }
hex = "0.4.0"
-rayon = "1.2.1"
+rayon-core = "1.12.1"
wild = "2.0.3"
[dev-dependencies]
diff --git a/b3sum/src/main.rs b/b3sum/src/main.rs
index 228737f..a55d910 100644
--- a/b3sum/src/main.rs
+++ b/b3sum/src/main.rs
@@ -475,7 +475,7 @@ fn check_one_checkfile(path: &Path, args: &Args, files_failed: &mut u64) -> Resu
fn main() -> Result<()> {
let args = Args::parse()?;
- let mut thread_pool_builder = rayon::ThreadPoolBuilder::new();
+ let mut thread_pool_builder = rayon_core::ThreadPoolBuilder::new();
if let Some(num_threads) = args.num_threads() {
thread_pool_builder = thread_pool_builder.num_threads(num_threads);
}
diff --git a/src/join.rs b/src/join.rs
index 227216a..862ebcf 100644
--- a/src/join.rs
+++ b/src/join.rs
@@ -67,7 +67,7 @@ impl Join for RayonJoin {
RA: Send,
RB: Send,
{
- rayon::join(oper_a, oper_b)
+ rayon_core::join(oper_a, oper_b)
}
}