kadmin_sys/lib.rs
1//! # Raw bindings to libkadm5
2//!
3//! This crate providers raw bindings to libkadm5.
4//!
5//! These bindings are generated by [bindgen](https://docs.rs/bindgen) by including `kadm5/admin.h`. The types provided
6//! are filtered to only import required symbols for kadm5. In the future, this crate may also allow
7//! for more symbols that may be useful, such as error types.
8//!
9//! This crate links against libkrb5 plus the required kadm5 library depending on the feature
10//! selected (see below).
11//!
12//! By default, those include headers and libraries are found using pkg-config. You can override
13//! this behavior with the following environment variables (which must be paths to directories
14//! containing the required libraries and header files):
15//!
16//! - `SYSTEM_DEPS_KRB5_SEARCH_NATIVE`
17//! - `SYSTEM_DEPS_KRB5_INCLUDE`
18//! - `SYSTEM_DEPS_KADM5CLNT_SEARCH_NATIVE`
19//! - `SYSTEM_DEPS_KADM5CLNT_INCLUDE`
20//! - `SYSTEM_DEPS_KADM5SRV_SEARCH_NATIVE`
21//! - `SYSTEM_DEPS_KADM5SRV_INCLUDE`
22//!
23//! You can read more about this in the [system-deps documentation](https://docs.rs/system-deps).
24//!
25//! # Features
26//!
27//! This crate offers two features, client and server. You must choose one of them depending on how
28//! your application is going to interact with the KDC. By default, `client` is enabled.
29//!
30//! - `client`: links against `kadm5clnt`. Use this is you plan to remotely access the KDC, using
31//! kadmind's GSS-API RPC interface, like the CLI tool `kadmin` does.
32//! - `server`: links against `kadm5srv`. Use this is you plan to directly edit the KDB from the
33//! machine where the KDC is running, like the CLI tool `kadmin.local` does.
34
35#![allow(non_upper_case_globals)]
36#![allow(non_camel_case_types)]
37#![allow(non_snake_case)]
38
39#[cfg(all(feature = "client", feature = "server", not(doc)))]
40compile_error!("Feature \"client\" and feature \"server\" cannot be enabled at the same time.");
41
42#[cfg(all(not(feature = "client"), not(feature = "server"), not(doc)))]
43compile_error!("Exactly one of feature \"client\" or feature \"server\" must be selected.");
44
45include!(concat!(env!("OUT_DIR"), "/bindings.rs"));