Mercurial > crates > nonstick
annotate README.md @ 74:c7c596e6388f
Make conversations type-safe (last big reorg) (REAL) (NOT CLICKBAIT)
In previous versions of Conversation, you could send messages and then
return messages of the wrong type or in the wrong order or whatever.
The receiver would then have to make sure that there were the right
number of messages and that each message was the right type.
That's annoying.
This change makes the `Message` enum a two-way channel, where the asker
puts their question into it, and then the answerer (the conversation)
puts the answer in and returns control to the asker. The asker then
only has to pull the Answer of the type they wanted out of the message.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Fri, 06 Jun 2025 22:21:17 -0400 |
parents | d83623951070 |
children | c9fc7e6257d3 |
rev | line source |
---|---|
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
1 # 🍳 nonstick |
16
f64ee7b6cdf1
Update metadata and README
Anthony Nowell <anthony@algorithmia.com>
parents:
diff
changeset
|
2 |
62
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
3 Nonstick lets you use PAM (Pluggable Authentication Modules) from Rust without getting stuck in unsafe code. |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
4 |
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
5 ## Status |
16
f64ee7b6cdf1
Update metadata and README
Anthony Nowell <anthony@algorithmia.com>
parents:
diff
changeset
|
6 |
62
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
7 This is currently very incomplete. |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
8 It only provides functionality for developing your own PAM authentication module (i.e., a backend that PAM calls to authenticate a user or do something similar). |
62
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
9 A very immature implementation of the PAM Conversation structure is gated behind the `experimental` feature. |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
10 At the moment, [Linux-PAM](https://github.com/linux-pam/linux-pam) is the only supported PAM implementation. |
16
f64ee7b6cdf1
Update metadata and README
Anthony Nowell <anthony@algorithmia.com>
parents:
diff
changeset
|
11 |
62
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
12 *If you’re looking for a library to implement a PAM client* (i.e., something that authenticates using PAM), consider the [`pam` crate](https://crates.io/crates/pam). |
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
13 |
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
14 APIs are likely to break before v0.1.0, and thereafter should stabilize to an eventual 1.0 release. |
17 | 15 |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
16 Goals include: |
17 | 17 |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
18 - Bindings for PAM clients. |
62
d83623951070
Further improve docs and put `conv` behind a feature gate.
Paul Fisher <paul@pfish.zone>
parents:
57
diff
changeset
|
19 - A robust and mature implementation of Conversation. |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
20 - Support for non–Linux-PAM implementations. |
17 | 21 |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
22 ## Credits |
16
f64ee7b6cdf1
Update metadata and README
Anthony Nowell <anthony@algorithmia.com>
parents:
diff
changeset
|
23 |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
24 This is a direct fork of [Anthony Nowell](http://anowell.com/)’s [`pam-rs`/`pam-bindings` crate](https://crates.io/crates/pam-bindings). |
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
25 `pam-rs` was in turn inspired by: |
16
f64ee7b6cdf1
Update metadata and README
Anthony Nowell <anthony@algorithmia.com>
parents:
diff
changeset
|
26 |
45
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
27 - [`rust-pam` by tozny](https://github.com/tozny/rust-pam) |
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
28 - [`pam_groupmap` by ndenev](https://github.com/ndenev/pam_groupmap) |
ce47901aab7a
Rename to “nonstick”, move to root, update docs and license.
Paul Fisher <paul@pfish.zone>
parents:
17
diff
changeset
|
29 - [`pam-http` by beatgammit](https://github.com/beatgammit/pam-http) |