#profile #precis #rfc-8265 #rfc-8266 #rfc-8264

precis-profiles

Implementation of the PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords as defined in rfc8265; and Nicknames as defined in rfc8266

13 releases

0.1.12 Mar 31, 2025
0.1.11 Jul 30, 2024
0.1.10 Mar 26, 2024
0.1.9 Oct 5, 2023
0.1.3 Nov 20, 2021

#32 in Internationalization (i18n)

Download history 1259/week @ 2024-12-22 2298/week @ 2024-12-29 2206/week @ 2025-01-05 3134/week @ 2025-01-12 2813/week @ 2025-01-19 2560/week @ 2025-01-26 3667/week @ 2025-02-02 3625/week @ 2025-02-09 2752/week @ 2025-02-16 3856/week @ 2025-02-23 2626/week @ 2025-03-02 4022/week @ 2025-03-09 4035/week @ 2025-03-16 4198/week @ 2025-03-23 4234/week @ 2025-03-30 3692/week @ 2025-04-06

16,554 downloads per month
Used in 94 crates (3 directly)

MIT/Apache

800KB
2.5K SLoC

Docs Crates.io

precis-profiles

PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols as described in rfc8264

This crate implements the next PRECIS profiles:

  • rfc8265. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords.
  • rfc8266. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Nicknames

Examples

assert_eq!(Nickname::prepare("Guybrush Threepwood"),
  Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::enforce("   Guybrush     Threepwood  "),
  Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::compare("Guybrush   Threepwood  ",
  "guybrush threepwood"), Ok(true));

Contributing

Patches and feedback are welcome.

Donations

If you find this project helpful, you may consider making a donation:

Bitcoin QR Code Ethereum QR Code

License

This project is licensed under either of

say thanks

Dependencies

~1–2.4MB
~51K SLoC