Mercurial > crates > nonstick
diff src/lib.rs @ 193:5074d8e00560
Doc improvements.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sat, 02 Aug 2025 19:49:21 -0400 |
parents | 4c39eaa4a5ae |
children |
line wrap: on
line diff
--- a/src/lib.rs Sat Aug 02 19:24:12 2025 -0400 +++ b/src/lib.rs Sat Aug 02 19:49:21 2025 -0400 @@ -84,15 +84,25 @@ //! the address space of the calling application. To implement a module, //! create a `dylib` crate and implement a [`PamModule`], and export it //! using the [`pam_export!`] macro. +//! //! ```toml -//! ## Your Cargo.toml +//! # Your Cargo.toml //! [package] -//! name = "example-package" -//! ## ... +//! name = "samename" +//! description = "Checks that username and password are the same" +//! # ... //! //! [lib] //! crate-type = ["cdylib"] +//! +//! [dependencies] +//! nonstick = "0.1" +//! # ... //! ``` +//! +//! Once you've set up the dylib crate and added `nonstick` as a dependency, +//! you can write the code itself: +//! //! ``` //! // Your lib.rs //! @@ -127,10 +137,10 @@ //! } //! ``` //! -//! This gets built into a library like `pam_samename.so`. By installing this -//! into your PAM library directory and configuring PAM to use it in -//! the authentication stack (beyond the scope of this documentation), it will -//! be used to authenticate users. +//! This gets built into a shared object. By installing this into the PAM +//! library directory at a place like `pam_samename.so` and configuring PAM +//! to use it in the authentication stack (beyond the scope of this +//! documentation), it will be used to authenticate users. //! //! # Configuration //!