Skip to content

MAIN: Don't use all rustls default features#720

Merged
Enet4 merged 3 commits intoEnet4:masterfrom
naterichman:rustls-default-features
Jan 31, 2026
Merged

MAIN: Don't use all rustls default features#720
Enet4 merged 3 commits intoEnet4:masterfrom
naterichman:rustls-default-features

Conversation

@naterichman
Copy link
Contributor

  • This disables ring and aws-lc-rs in the ul library which allows users of the library to choose their own cryptoprovider
  • The binaries (storescu/storescp/etc) still use aws-lc-rs as default since the app-common package specifies rustls with default features.

Fixes #719

* This disables ring and aws-lc-rs which allows users of the library to choose their own cryptoprovider
* The binaries (storescu/storescp/etc) still use aws-lc-rs as default since the `app-common` package specifies
rustls with default features.
@Enet4 Enet4 added A-lib Area: library C-ul Crate: dicom-ul labels Jan 5, 2026
@Enet4
Copy link
Owner

Enet4 commented Jan 10, 2026

I've been trying to build dicom-ul after these changes and it seems to me that Cargo is still pulling aws-lc-rs.

❯ cargo tree -p dicom-ul --features=async-tls -e normal
dicom-ul v0.9.0 (.../dicom-rs/ul)
├── byteordered v0.6.0
│   └── byteorder v1.5.0
├── bytes v1.10.1
├── cfg-if v1.0.4
├── dicom-encoding v0.9.0 (.../dicom-rs/encoding)
│   ├── byteordered v0.6.0 (*)
│   ├── dicom-core v0.9.0 (.../dicom-rs/core)
│   │   ├── chrono v0.4.42
│   │   │   ├── iana-time-zone v0.1.64
│   │   │   └── num-traits v0.2.19
│   │   ├── either v1.15.0
│   │   ├── itertools v0.14.0
│   │   │   └── either v1.15.0
│   │   ├── num-traits v0.2.19
│   │   ├── safe-transmute v0.11.3
│   │   ├── smallvec v1.15.1
│   │   └── snafu v0.8.9
│   │       └── snafu-derive v0.8.9 (proc-macro)
│   │           ├── heck v0.5.0
│   │           ├── proc-macro2 v1.0.101
│   │           │   └── unicode-ident v1.0.19
│   │           ├── quote v1.0.41
│   │           │   └── proc-macro2 v1.0.101 (*)
│   │           └── syn v2.0.106
│   │               ├── proc-macro2 v1.0.101 (*)
│   │               ├── quote v1.0.41 (*)
│   │               └── unicode-ident v1.0.19
│   ├── dicom-dictionary-std v0.9.0 (.../dicom-rs/dictionary-std)
│   │   ├── dicom-core v0.9.0 (.../dicom-rs/core) (*)
│   │   └── once_cell v1.21.3
│   ├── encoding v0.2.33
│   │   ├── encoding-index-japanese v1.20141219.5
│   │   │   └── encoding_index_tests v0.1.4
│   │   ├── encoding-index-korean v1.20141219.5
│   │   │   └── encoding_index_tests v0.1.4
│   │   ├── encoding-index-simpchinese v1.20141219.5
│   │   │   └── encoding_index_tests v0.1.4
│   │   ├── encoding-index-singlebyte v1.20141219.5
│   │   │   └── encoding_index_tests v0.1.4
│   │   └── encoding-index-tradchinese v1.20141219.5
│   │       └── encoding_index_tests v0.1.4
│   └── snafu v0.8.9 (*)
├── dicom-transfer-syntax-registry v0.9.0 (.../dicom-rs/transfer-syntax-registry)
│   ├── byteordered v0.6.0 (*)
│   ├── dicom-core v0.9.0 (.../dicom-rs/core) (*)
│   ├── dicom-encoding v0.9.0 (.../dicom-rs/encoding) (*)
│   ├── lazy_static v1.5.0
│   └── tracing v0.1.41
│       ├── pin-project-lite v0.2.16
│       ├── tracing-attributes v0.1.30 (proc-macro)
│       │   ├── proc-macro2 v1.0.101 (*)
│       │   ├── quote v1.0.41 (*)
│       │   └── syn v2.0.106 (*)
│       └── tracing-core v0.1.34
│           └── once_cell v1.21.3
├── rustls v0.23.33
│   ├── aws-lc-rs v1.14.1
│   │   ├── aws-lc-sys v0.32.3
│   │   └── zeroize v1.8.2
│   ├── log v0.4.28
│   ├── once_cell v1.21.3
│   ├── rustls-pki-types v1.12.0
│   │   └── zeroize v1.8.2
│   ├── rustls-webpki v0.103.7
│   │   ├── aws-lc-rs v1.14.1 (*)
│   │   ├── rustls-pki-types v1.12.0 (*)
│   │   └── untrusted v0.9.0
│   ├── subtle v2.6.1
│   └── zeroize v1.8.2
├── snafu v0.8.9 (*)
├── tokio v1.48.0
│   ├── bytes v1.10.1
│   ├── libc v0.2.177
│   ├── mio v1.1.0
│   │   └── libc v0.2.177
│   ├── pin-project-lite v0.2.16
│   └── socket2 v0.6.1
│       └── libc v0.2.177
├── tokio-rustls v0.26.4
│   ├── rustls v0.23.33 (*)
│   └── tokio v1.48.0 (*)
└── tracing v0.1.41 (*)

Can this introduce issues to users who would rather not have aws-lc-rs included anywhere in the dependency tree?

I tried removing the default features from tokio-rustls but the outcome was roughly the same.

@naterichman
Copy link
Contributor Author

I think this is because the applications (dicom-storescu, dicom-storescp, etc.) specify rustls default features, and the tree is for the workspace dependencies, not specific to a package. But I don't know that for sure, I'll be honest I don't know enough about how lockfiles, features, dependencies and such; especially in a workspace.

Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found the two problems that were locking the project with aws-lc-rs. After the proposed changes it is possible to depend exclusively on ring with a project like this:

[dependencies.rustls]
version = "0.23.36"
default-features = false
features = [
    "logging",
    "tls12",
    "ring"
]

[dependencies.dicom-ul]
version = "0.9"
features = [
    "async-tls",
    "sync-tls",
]

Co-authored-by: Eduardo Pinho <enet4mikeenet@gmail.com>
@naterichman
Copy link
Contributor Author

I had updated the tokio-rustls dep specification to not use default features, but I think it was that prefer-post-quantum that was locking aws-lc-rs

@Enet4 Enet4 self-requested a review January 28, 2026 16:28
Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Enet4 Enet4 merged commit 555bfff into Enet4:master Jan 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library C-ul Crate: dicom-ul

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest version of dicom-rs, forces users, to use awc-lc-rs which is very hard to cross-compile

2 participants

Comments