Skip to content

Commit 18792c2

Browse files
authored
feat: Increase MSRV to 1.88 and update dependencies (#626)
* feat: Switch to Rust-version-aware dependency resolver, and enable dependency updates that have a higher MSRV * Fix: unpin `time` in main dependency section * Fix: bump MSRV to 1.85 to enable resolver 3 * Make `time` feature explicit * Don't need time/wasm-bindgen on non-wasm targets * Fix: need to use 1.85.0, not 1.85.1, for MSRV test * Fix: use >= rather than ^ for time version * Fix: replace other instances of ^0.3.45 with >=0.3.45 for time version * Fix? use bare "0.3.45" for time version * Fix: increase MSRV to 1.88 to work around cargo resolver limitations * Fix? Remove duplicate dependency entry for `time` * Fix: newer `nt_time` version doesn't `impl TryInto<time::OffsetDateTime> for FileTime`, so use UtcDateTime instead
1 parent c9bce39 commit 18792c2

4 files changed

Lines changed: 18 additions & 22 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- rustalias: stable
6565
rust: stable
6666
- rustalias: msrv
67-
rust: "1.83"
67+
rust: "1.88.0"
6868
- rustalias: nightly
6969
rust: nightly
7070
exclude:

Cargo.toml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/zip-rs/zip2.git"
1212
keywords = ["zip", "archive", "compression"]
1313
# Any change to rust-version must be reflected also in `README.md` and `.github/workflows/ci.yaml`.
1414
# The MSRV policy is documented in `README.md`.
15-
rust-version = "1.83.0"
15+
rust-version = "1.88"
1616
categories = ["compression", "filesystem", "parser-implementations"]
1717
description = """
1818
Library to support the reading and writing of zip files.
@@ -29,56 +29,51 @@ arbitrary = { version = "1.4", features = ["derive"], optional = true }
2929
aes = { version = "0.8", optional = true }
3030
bzip2 = { version = "0.6", default-features = false, optional = true }
3131
chrono = { version = "^0.4.27", optional = true, default-features = false, features = ["std"] }
32-
constant_time_eq = { version = "0.3", optional = true }
32+
constant_time_eq = { version = "0.4", optional = true }
3333
crc32fast = "1.5"
3434
flate2 = { version = "1.1", default-features = false, optional = true }
3535
hmac = { version = "0.12", optional = true, features = ["reset"] }
3636
indexmap = "2"
3737
jiff = { version = "0.2.4", optional = true }
3838
memchr = "2.7"
39-
nt-time = { version = "0.10.6", default-features = false, optional = true }
40-
ppmd-rust = { version = "1.3", optional = true }
39+
nt-time = { version = "0.13", default-features = false, optional = true }
40+
ppmd-rust = { version = "1.4", optional = true }
4141
pbkdf2 = { version = "0.12", optional = true }
4242
sha1 = { version = "0.10", optional = true }
43-
time = { version = "=0.3.45", default-features = false, optional = true, features = [
44-
"std",
45-
] }
4643
zeroize = { version = "1.8", optional = true, features = ["zeroize_derive"] }
4744
zstd = { version = "^0.13.3", optional = true, default-features = false }
4845
zopfli = { version = "0.8", optional = true }
4946
deflate64 = { version = "0.1.10", optional = true }
5047
lzma-rust2 = { version = "0.15", optional = true, default-features = false, features = ["std", "encoder", "optimization", "xz"] }
51-
bitstream-io = { version = "4.5", optional = true }
48+
bitstream-io = { version = "4.9", optional = true }
5249
typed-path = "0.12"
5350

5451
# native:
5552
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
56-
getrandom = { version = "0.3", default-features = false, optional = true }
57-
time = { version = "=0.3.45", default-features = false, optional = true, features = [
58-
"wasm-bindgen"
59-
] }
53+
getrandom = { version = "0.4", default-features = false, optional = true }
54+
time = { version = "0.3.47", default-features = false, optional = true, features = ["std"] }
6055

6156
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
62-
getrandom = { version = "0.3", default-features = false }
57+
getrandom = { version = "0.4", default-features = false }
6358

6459
# wasm32
6560
[target.'cfg(target_arch = "wasm32")'.dependencies]
66-
getrandom = { version = "0.3", default-features = false, features = ["wasm_js"], optional = true }
67-
time = { version = "=0.3.45", default-features = false, optional = true, features = [
61+
getrandom = { version = "0.4", default-features = false, features = ["wasm_js"], optional = true }
62+
time = { version = "0.3.47", default-features = false, optional = true, features = [
6863
"std",
6964
"wasm-bindgen"
7065
] }
7166

7267
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
73-
getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] }
68+
getrandom = { version = "0.4", default-features = false, features = ["wasm_js"] }
7469
wasm-bindgen-test = "^0.3.56"
7570

7671
[dev-dependencies]
7772
bencher = "0.1"
78-
getrandom = { version = "0.3", default-features = false }
73+
getrandom = { version = "0.4", default-features = false }
7974
walkdir = "2.5"
80-
time = { version = "=0.3.45", features = ["formatting", "macros"] }
81-
clap = { version = "=4.4.18", features = ["derive"] }
75+
time = { version = "0.3.47", features = ["formatting", "macros"] }
76+
clap = { version = "^4.4.18", features = ["derive"] }
8277
tempfile = "3.15"
8378
rayon = "1.11"
8479

@@ -104,6 +99,7 @@ xz = ["dep:lzma-rust2"]
10499
_bzip2_any = []
105100
bzip2 = ["dep:bzip2", "bzip2/default", "_bzip2_any"]
106101
legacy-zip = ["bitstream-io"]
102+
time = ["dep:time"]
107103
default = [
108104
"aes-crypto",
109105
"bzip2",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ By default `aes-crypto`, `bzip2`, `deflate`, `deflate64`, `lzma`, `ppmd`, `time`
5454

5555
# MSRV
5656

57-
Our current Minimum Supported Rust Version is **1.83**. When adding features,
57+
Our current Minimum Supported Rust Version is **1.88**. When adding features,
5858
we will follow these guidelines:
5959

6060
- We will always support a minor Rust version that has been stable for at least 6 months.

tests/zip_ntfs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn test_ntfs() {
1313
assert_eq!(ts.mtime(), 133_813_273_144_169_390);
1414
#[cfg(feature = "nt-time")]
1515
assert_eq!(
16-
time::OffsetDateTime::try_from(ts.modified_file_time()).unwrap(),
16+
time::UtcDateTime::try_from(ts.modified_file_time()).unwrap(),
1717
time::macros::datetime!(2025-01-14 11:21:54.416_939_000 UTC)
1818
);
1919

0 commit comments

Comments
 (0)