Skip to content

Commit

Permalink
Set minimal rust version to 1.72
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Mikrut committed Nov 4, 2024
1 parent f153093 commit 12a03ae
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 10 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
strategy:
matrix:
rust:
- 1.72.0
- stable
- beta
steps:
Expand All @@ -24,16 +25,39 @@ jobs:
components: clippy
cache: true
# test project with default + extra features
- run: cargo test --features image,ndarray,sop-class,rle,cli,jpegxl
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test --features image,ndarray,sop-class,rle,cli,jpegxl
# test dicom-pixeldata with openjp2
- run: cargo test -p dicom-pixeldata --features openjp2
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test -p dicom-pixeldata --features openjp2
# test dicom-pixeldata with openjpeg-sys and charls
- run: cargo test -p dicom-pixeldata --features openjpeg-sys,charls
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test -p dicom-pixeldata --features openjpeg-sys,charls
# test dicom-pixeldata with gdcm-rs
- run: cargo test -p dicom-pixeldata --features gdcm
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test -p dicom-pixeldata --features gdcm
# test dicom-pixeldata without default features
- run: cargo test -p dicom-pixeldata --no-default-features
- run: cargo test -p dicom-ul --features async
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test -p dicom-pixeldata --no-default-features
# test dicom-ul with async feature
- if: matrix.rust == 'stable' || matrix.rust == 'beta'
run: cargo test -p dicom-ul --features async
# test library projects with minimum rust version
- if: matrix.rust == '1.72.0'
run: |
cargo test -p dicom-core
cargo test -p dicom-encoding
cargo test -p dicom-dictionary-std
cargo test -p dicom-parser
cargo test -p dicom-transfer-syntax-registry
cargo test -p dicom-object
cargo test -p dicom-dump --no-default-features --features sop-class
cargo test -p dicom-json
cargo test -p dicom-ul
cargo test -p dicom-pixeldata
cargo check -p dicom
env:
RUSTFLAGS: -W warnings
# run Clippy with stable toolchain
- if: matrix.rust == 'stable'
run: cargo clippy
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ no other development dependencies are necessary
unless certain extensions are included via Cargo features.
Consult each crate for guidelines on selecting features to suit your needs.

Minimum supported Rust version is 1.72.0 and only applies to the library crates with default features.
Binary crates and extra features may require a newer version of Rust.

## Roadmap & Contributing

This project is under active development.
Expand Down
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
msrv="1.72.0"
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "Efficient and practical core library for DICOM compliant systems"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
keywords = ["dicom"]
Expand Down
1 change: 1 addition & 0 deletions dictionary-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.0"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "Standard DICOM attribute dictionary"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
keywords = ["dicom", "dictionary"]
Expand Down
1 change: 1 addition & 0 deletions dump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A CLI tool for inspecting DICOM files"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
categories = ["command-line-utilities"]
Expand Down
1 change: 1 addition & 0 deletions encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "DICOM encoding and decoding primitives"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
categories = ["encoding"]
Expand Down
1 change: 1 addition & 0 deletions fromimage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "dicom-fromimage"
version = "0.7.0"
edition = "2018"
rust-version = "1.72.0"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A CLI tool for replacing the image content from DICOM files"
license = "MIT OR Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions object/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "dicom-object"
version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
description = "A high-level API for reading and manipulating DICOM objects"
Expand Down
2 changes: 1 addition & 1 deletion object/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ mod tests {

#[test]
fn errors_not_too_large() {
assert_type_not_too_large::<AccessError>(56);
assert_type_not_too_large::<AccessError>(64);
}

#[test]
Expand Down
1 change: 1 addition & 0 deletions parent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A pure Rust implementation of the DICOM standard"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A middle-level parser and printer of DICOM data sets"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
categories = ["parser-implementations"]
Expand Down
1 change: 1 addition & 0 deletions pixeldata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "dicom-pixeldata"
version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>", "Peter Evers <pevers90@gmail.com>"]
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
description = "A high-level API for decoding DICOM objects into images and ndarrays"
repository = "https://github.com/Enet4/dicom-rs"
Expand Down
7 changes: 4 additions & 3 deletions pixeldata/src/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,12 @@ mod tests {

#[test]
fn errors_are_not_too_large() {
let max_size = 88;
let size = std::mem::size_of::<super::GetAttributeError>();
assert!(
size <= 80,
"GetAttributeError size is too large ({} > 80)",
size
size <= max_size,
"GetAttributeError size is too large ({} > {})",
size, max_size
);
}

Expand Down
1 change: 1 addition & 0 deletions toimage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "dicom-toimage"
version = "0.7.1"
edition = "2018"
rust-version = "1.72.0"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A CLI tool for converting DICOM files into general purpose image files"
license = "MIT OR Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions transfer-syntax-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>"]
description = "A registry of DICOM transfer syntaxes"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
keywords = ["dicom"]
Expand Down
1 change: 1 addition & 0 deletions ul/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.7.1"
authors = ["Eduardo Pinho <enet4mikeenet@gmail.com>", "Paul Knopf <pauldotknopf@gmail.com>"]
description = "Types and methods for interacting with the DICOM Upper Layer Protocol"
edition = "2018"
rust-version = "1.72.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enet4/dicom-rs"
categories = ["network-programming"]
Expand Down

0 comments on commit 12a03ae

Please sign in to comment.