diff libpam-sys/libpam-sys-consts/src/lib.rs @ 161:e9354e655f38

Improve PAM detection docs.
author Paul Fisher <paul@pfish.zone>
date Sun, 13 Jul 2025 16:06:51 -0400
parents ab8020566cd9
children
line wrap: on
line diff
--- a/libpam-sys/libpam-sys-consts/src/lib.rs	Sun Jul 13 15:38:00 2025 -0400
+++ b/libpam-sys/libpam-sys-consts/src/lib.rs	Sun Jul 13 16:06:51 2025 -0400
@@ -15,6 +15,18 @@
 /// Use [`enable_pam_impl_cfg`] in your `build.rs` to generate custom `#[cfg]`s
 /// for conditional compilation based on PAM implementation.
 ///
+/// ```
+/// // Your package's build.rs:
+///
+/// use libpam_sys_consts::pam_impl;
+/// // also available at libpam_sys::pam_impl
+///
+/// fn main() {
+///     pam_impl::enable_pam_impl_cfg();
+///     // whatever else you do in your build script.
+/// }
+/// ```
+///
 /// This will set the current `pam_impl` as well as registering all known
 /// PAM implementations with `rustc-check-cfg` to get cfg-checking.
 ///