Skip to main content

elemental_core/
lib.rs

1/// Emits a compile error when the invoking crate has not enabled any TLS backend feature.
2#[macro_export]
3macro_rules! require_tls_backend {
4    () => {
5        #[cfg(not(any(
6            feature = "tls-aws-lc",
7            feature = "tls-rustls-no-provider",
8            feature = "tls-native",
9            feature = "tls-native-vendored"
10        )))]
11        compile_error!(concat!(
12            "`",
13            env!("CARGO_PKG_NAME"),
14            "` requires a TLS backend. Enable one of `tls-aws-lc` (default), \
15             `tls-rustls-no-provider`, `tls-native`, or `tls-native-vendored`. \
16             When using `default-features = false`, add a TLS backend feature explicitly."
17        ));
18    };
19}
20
21#[cfg(any(
22    feature = "http",
23    feature = "microsoft-auth",
24    feature = "yggdrasil-auth"
25))]
26require_tls_backend!();
27
28pub mod auth;
29#[cfg(feature = "http")]
30pub mod http;
31pub mod launcher;
32pub mod minecraft;
33pub mod runtime;
34pub mod storage;
35#[cfg(feature = "http")]
36pub mod url;
37pub mod version;