1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Raw FFI for the threadless, statically linked c-ares DNS library.
//!
//! The default `pre-release` feature builds upstream `main`; `stable` selects
//! v1.34.9. `CARES_DIR` overrides the source checkout. Both builds disable the
//! internal c-ares threads and event thread support.
//! Use an absolute source path for `CARES_DIR`; relative paths resolve from this
//! crate's directory. Cached branch checkouts are reused without a network fetch.
//!
//! All functions are unsafe: callers uphold the upstream C contracts, including
//! pointer validity, ownership and callback lifetimes. DNS callback records are
//! borrowed only for the callback duration and must be duplicated to retain them.
//! Integer wrappers preserve the full C enum domain, including unnamed DNS wire
//! values. Named values are available both at the crate root and on their type.
//!
//! # Safety
//! Initialize and clean up global library state on one thread, and keep each
//! channel on its creating thread. Do not unwind through C callbacks or drive
//! the same channel recursively from a callback. Retained callback code and data
//! must outlive registration, including callbacks invoked during destruction.
//! Raw pointers must satisfy each function's documented validity, aliasing, and
//! allocation ownership requirements; borrowed callback records must not escape.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;