-
Notifications
You must be signed in to change notification settings - Fork 660
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
How I use CryptoProvider::install_default() ? #1938
Comments
See https://docs.rs/rustls/latest/rustls/index.html#crate-features
https://rust-lang.github.io/rust-bindgen/requirements.html#requirements aside from that, yes, you will need a working sysroot for the target and to tell bindgen where it is. |
Ok, maybe it is just me, but the simplest solution boils down to using the cargo add rustls --features ring And then, early in your main fn call: rustls::crypto::ring::default_provider().install_default().expect("Failed to install rustls crypto provider"); Correct? |
Installing just |
Am I correct that one also has to set |
@lcmgh The answer to that depends. If your crate only activates one of the |
rustls = { version = "0.23.5" } In that case might it be that another dep of me brings rustls with |
@lcmgh You can likely get to the bottom of that using |
Hello, I receive panic
PanicInfo { payload: Any { .. }, message: Some(no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point), location: Location { file: "/home/incker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.5/src/crypto/mod.rs", line: 260, col: 14 }, can_unwind: true, force_no_backtrace: false }
But there is no example how to use CryptoProvider::install_default()
Cargo.toml:
rustls = {version = "0.23.5", default-features = false, features = ["std"]}
If I remove
default-features = false
it requiresPlease enable the 'bindgen' feature on aws-lc-rs or aws-lc-sys.For more information, see the aws-lc-rs User Guide: https://aws.github.io/aws-lc-rs/index.html
but adding this:
aws-lc-rs = {version = "1.7.0", features = ["bindgen"]}
requires:
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
thread 'main' panicked at /home/builder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.15.0/builder/bindgen.rs:155:10:
Unable to generate bindings.: ClangDiagnostic("/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found\n")
And i haven't found package gcc-multilib for arm-buildroot-linux-musleabihf ((
Forward thank you!
The text was updated successfully, but these errors were encountered: