Skip to main content

veilid_tools/resolver/
mod.rs

1use super::*;
2
3/////////////////////////////////////////////////////////////////////////////////
4// Resolver
5//
6// Uses system resolver on windows and hickory-resolver elsewhere
7// hickory-resolver hangs for a long time on Windows building some cache or something
8// and we really should be using the built-in system resolver when possible
9
10cfg_if! {
11
12    /////////////////////////////////////////////////////////////////////////////
13    // WASM (unsupported)
14
15    if #[cfg(all(target_arch = "wasm32", target_os = "unknown"))] {
16        mod wasm;
17        pub use wasm::*;
18    }
19
20    /////////////////////////////////////////////////////////////////////////////
21    // Non-Windows
22
23    else if #[cfg(not(target_os = "windows"))] {
24        mod non_windows;
25        pub use non_windows::*;
26    }
27
28    /////////////////////////////////////////////////////////////////////////////
29    // Windows
30
31    else {
32        mod windows;
33        pub use windows::*;
34    }
35
36}
37
38#[derive(Debug, Clone, Eq, PartialEq, ThisError)]
39pub enum ResolverError {
40    #[error("Generic resolver error")]
41    Generic(String),
42}