Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default-features = false with hyper-rustls fails #243

Open
HollayHorvath opened this issue Sep 25, 2024 · 1 comment
Open

default-features = false with hyper-rustls fails #243

HollayHorvath opened this issue Sep 25, 2024 · 1 comment

Comments

@HollayHorvath
Copy link

I had the following line in my Cargo.toml which failed to compile:

yup-oauth2 = { version = "11.0", default-features = false, features = ["hyper-rustls"] }

The error was the following:

error[E0425]: cannot find function `default_crypto_provider` in this scope
    --> /home/.../.cargo/registry/src/index.crates.io-6f17d22bba15001f/yup-oauth2-11.0.0/src/authenticator.rs:1010
:45
     |
1010 |             .with_provider_and_native_roots(default_crypto_provider())?
     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `default_crypto_provider` in this scope
    --> /home/.../.cargo/registry/src/index.crates.io-6f17d22bba15001f/yup-oauth2-11.0.0/src/authenticator.rs:1030
:45
     |
1030 |             .with_provider_and_native_roots(default_crypto_provider())
     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

Simply removing the default-features = false solves the problem, it seems to be a conditional compilation issue.

@dermesser
Copy link
Owner

Looking at the features, you have to decide between crypto libraries - either use ring or aws-lc-rs. Although I agree that an explicit build error would make users' lives easier at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants