The Rust SASL framework

![Latest Version] ![docs] ![maintenance] ![license] ![msrv]

rsasl is an framework for RFC 4422; the Simple Authentication and Security Layer — aka SASL.

It is designed to enable implementing SASL support in protocol handling crates while abstracting away the details, allowing downstream users to select available mechanisms and add support for additional mechanisms without any changes required in the protocol handling crate.

rsasl provide a number of mechanisms by itself:

Support for the following mechanisms was available in rsasl 1 but is not implemented in rsasl 2:

Additional mechanisms can be implemented by other crates. (NOTE: In the current v2.0.0 this feature is unstable)

Conditional compilation of mechanism

rsasl allows users to select the available mechanisms at compile time using cargo features. For an overview refer to the module documentation of rsasl::mechanisms.

MSRV — Minimum Supported Rust Version

The current msrv rsasl is Rust 1.56.0, however do note that certain features (e.g. registry_static) have dependencies with much more recent msrv.

Versions

Major version 1 of this crate uses gsasl-sys which are binding to GNU gsasl. This makes the use of unsafe code and FFI necessary. You can find the latest 1.X.Y version in the branch 1.X.X

Version 2.0.0-preview is a pure-Rust rewrite using sources transpiled using c2rust. Keep in mind that despite being Rust this code is as least as unsafe as the original C code. Most of this unsafe code will be removed before the first non-preview 2.0.0 release.

License

Version 2 and later of this library are dual licensed under both Apache-2.0 and MIT, at your option.

Examples

You can find a few examples on GitHub.