cargo_tangle/lib.rs
1pub mod command;
2pub mod foundry;
3pub mod settings;
4pub mod utils;
5pub mod workspace;
6
7#[cfg(test)]
8mod tests;
9
10/// This force installs the default crypto provider.
11///
12/// This is necessary in case there are more than one available backends enabled in rustls (ring,
13/// aws-lc-rs).
14///
15/// This should be called high in the main fn.
16///
17/// See also:
18/// <https://github.com/snapview/tokio-tungstenite/issues/353#issuecomment-2455100010>
19/// <https://github.com/awslabs/aws-sdk-rust/discussions/1257>
20///
21/// # Panics
22/// If the default crypto provider cannot be installed, this function will panic.
23pub fn install_crypto_provider() {
24 // https://github.com/snapview/tokio-tungstenite/issues/353
25 rustls::crypto::ring::default_provider()
26 .install_default()
27 .expect("Failed to install default rustls crypto provider");
28}