diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 750d576a..a92141d7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,6 +14,7 @@ jobs: strategy: matrix: rust: + - 1.72.0 - stable - beta steps: @@ -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 diff --git a/README.md b/README.md index 2df926ab..9aaaf9a4 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..e6d25b89 --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +msrv="1.72.0" \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index af24dc0d..c93a44f6 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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"] diff --git a/dictionary-std/Cargo.toml b/dictionary-std/Cargo.toml index d6a04e3e..60e584c0 100644 --- a/dictionary-std/Cargo.toml +++ b/dictionary-std/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.0" authors = ["Eduardo Pinho "] 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"] diff --git a/dump/Cargo.toml b/dump/Cargo.toml index c016e159..c37d225a 100644 --- a/dump/Cargo.toml +++ b/dump/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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"] diff --git a/encoding/Cargo.toml b/encoding/Cargo.toml index 0315960c..04fc1789 100644 --- a/encoding/Cargo.toml +++ b/encoding/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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"] diff --git a/fromimage/Cargo.toml b/fromimage/Cargo.toml index 34556d5d..b6a6d5c0 100644 --- a/fromimage/Cargo.toml +++ b/fromimage/Cargo.toml @@ -2,6 +2,7 @@ name = "dicom-fromimage" version = "0.7.0" edition = "2018" +rust-version = "1.72.0" authors = ["Eduardo Pinho "] description = "A CLI tool for replacing the image content from DICOM files" license = "MIT OR Apache-2.0" diff --git a/object/Cargo.toml b/object/Cargo.toml index 5025d640..fd4bb66d 100644 --- a/object/Cargo.toml +++ b/object/Cargo.toml @@ -3,6 +3,7 @@ name = "dicom-object" version = "0.7.1" authors = ["Eduardo Pinho "] 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" diff --git a/object/src/lib.rs b/object/src/lib.rs index 31047d97..ca05ec18 100644 --- a/object/src/lib.rs +++ b/object/src/lib.rs @@ -772,7 +772,7 @@ mod tests { #[test] fn errors_not_too_large() { - assert_type_not_too_large::(56); + assert_type_not_too_large::(64); } #[test] diff --git a/parent/Cargo.toml b/parent/Cargo.toml index a0553a21..09e81462 100644 --- a/parent/Cargo.toml +++ b/parent/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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" diff --git a/parser/Cargo.toml b/parser/Cargo.toml index a1cd3a34..3c970222 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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"] diff --git a/pixeldata/Cargo.toml b/pixeldata/Cargo.toml index 78a913e5..bb2978b9 100644 --- a/pixeldata/Cargo.toml +++ b/pixeldata/Cargo.toml @@ -3,6 +3,7 @@ name = "dicom-pixeldata" version = "0.7.1" authors = ["Eduardo Pinho ", "Peter Evers "] 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" diff --git a/pixeldata/src/attribute.rs b/pixeldata/src/attribute.rs index 89443947..82521556 100644 --- a/pixeldata/src/attribute.rs +++ b/pixeldata/src/attribute.rs @@ -626,11 +626,12 @@ mod tests { #[test] fn errors_are_not_too_large() { + let max_size = 88; let size = std::mem::size_of::(); assert!( - size <= 80, - "GetAttributeError size is too large ({} > 80)", - size + size <= max_size, + "GetAttributeError size is too large ({} > {})", + size, max_size ); } diff --git a/toimage/Cargo.toml b/toimage/Cargo.toml index 05b5c94e..37022385 100644 --- a/toimage/Cargo.toml +++ b/toimage/Cargo.toml @@ -2,6 +2,7 @@ name = "dicom-toimage" version = "0.7.1" edition = "2018" +rust-version = "1.72.0" authors = ["Eduardo Pinho "] description = "A CLI tool for converting DICOM files into general purpose image files" license = "MIT OR Apache-2.0" diff --git a/transfer-syntax-registry/Cargo.toml b/transfer-syntax-registry/Cargo.toml index 0546d95b..f28f17db 100644 --- a/transfer-syntax-registry/Cargo.toml +++ b/transfer-syntax-registry/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho "] 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"] diff --git a/ul/Cargo.toml b/ul/Cargo.toml index ab3607ad..d52eba9e 100644 --- a/ul/Cargo.toml +++ b/ul/Cargo.toml @@ -4,6 +4,7 @@ version = "0.7.1" authors = ["Eduardo Pinho ", "Paul Knopf "] 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"]