Bindings to Cyrus SASL.
vendored Cargo feature is enabled, a bundled copy of libsasl2 will
be compiled and statically linked. The libsasl2 version will generally track
the latest upstream release. Note that the version number of this crate is
unrelated to the bundled version of libsasl2.
sasl2-sys is currently bundling libsasl2 v2.1.27.
When configuring the bundled library, sasl2-sys is intentionally conservative in the features it enables. All optional features are disabled by default. The following Cargo features can be used to re-enable features as necessary.
gssapi-vendoredenables the GSSAPI plugin (
--enable-gssapi) by building and statically linking a copy of MIT's Kerberos implementation using the krb5-src crate.
plainenables the PLAIN plugin (
scramenables the SCRAM plugin (
--enable-scram). This requires linking against OpenSSL via the openssl-sys crate.
Note that specifying any of these features implies
For convenience, the
vendored feature of the openssl-sys crate is
re-exported as the
openssl-vendored feature. This feature is unlikely to
be useful unless used in conjuction with the
The eventual goal is to expose each libsasl2 feature behind a Cargo feature of the same name. Pull requests on this front are welcomed.
vendored Cargo feature, sasl2-sys will search for the libsasl2
library and headers in several standard locations. If the
feature is enabled, as it is by default, pkg-config will be queried for the
location of the sasl2 library.
To override the automatic search, set the
SASL2_DIR environment variable
to the path of the directory containing the desired libsasl2 directory.
If the layout of the libsasl2 directory is nonstandard, set the
SASL2_INCLUDE_DIR environment variables to the path of
the directory containining the libsasl2 libraries and headers, respectively.
These environment variables take precedence over
SASL2_DIR if set.
When linking against a system library, dynamic linking is preferred unless
SASL2_STATIC environment variable is set.
Upstream supports most major platforms, but sasl2-sys is only tested on recent versions of Ubuntu, CentOS, and macOS. Patches that improve support for other platforms are welcome.
HMAC MD5 utilities.
Almagamates exports from all other modules.
Property request/response management routines.
Main SASL API.
SASL plugin API.
SASL utility functions.