23 个版本

0.1.22+2.1.28 2024年5月13日
0.1.20+2.1.28 2022年5月26日
0.1.19+2.1.27 2022年1月16日
0.1.17 2021年12月27日
0.1.12 2020年7月9日

身份验证 中排名 83

Download history 24585/week @ 2024-05-01 29273/week @ 2024-05-08 25466/week @ 2024-05-15 26243/week @ 2024-05-22 25386/week @ 2024-05-29 24515/week @ 2024-06-05 26720/week @ 2024-06-12 25560/week @ 2024-06-19 26638/week @ 2024-06-26 24247/week @ 2024-07-03 27818/week @ 2024-07-10 28436/week @ 2024-07-17 31487/week @ 2024-07-24 34726/week @ 2024-07-31 32465/week @ 2024-08-07 30117/week @ 2024-08-14

每月下载量 134,193
用于 12 个 Crates (4 直接)

Apache-2.0

3MB
73K SLoC

C 51K SLoC // 0.2% comments M4 9K SLoC // 0.2% comments Shell 8K SLoC // 0.2% comments Visual Studio Project 2K SLoC Rust 1.5K SLoC // 0.1% comments Visual Studio Solution 479 SLoC Automake 420 SLoC // 0.5% comments Python 104 SLoC // 0.0% comments RPM Specfile 101 SLoC Batch 43 SLoC PowerShell 23 SLoC Perl 13 SLoC // 0.4% comments ReScript 1 SLoC R 1 SLoC

包含 (自动工具混淆代码,715KB) sasl2/configure,(神秘的 autoconf 代码,45KB) sasl2/configure.ac

rust-sasl

crates.io CI Rust Documentation

Rust 编程语言的 Cyrus SASL 绑定。

查看文档。

安装

# Cargo.toml
[dependencies]
sasl2-sys = "0.1.22"

lib.rs:

Cyrus SASL 的绑定。

此包提供了对 Cyrus SASL 库 的原始绑定,libsasl2。每个模块对应于 C API 中的公共头文件。

构建配置

供应商

如果启用了 vendored Cargo 功能,将编译并静态链接一个包含的 libsasl2 版本。libsasl2 的版本通常将与最新的上游版本保持一致。请注意,此 crate 的版本号与捆绑的 libsasl2 版本无关。

sasl2-sys 当前捆绑了 libsasl2 v2.1.28

当配置捆绑的库时,sasl2-sys 故意保守地启用功能。默认禁用所有可选功能。以下 Cargo 功能可用于根据需要重新启用功能。

  • gssapi-vendored 通过构建并静态链接 MIT Kerberos 实现的副本来启用 GSSAPI 插件 (--enable-gssapi),使用 krb5-src crate。

    此功能在 Windows 上不受支持。

  • plain 启用 PLAIN 插件 (--enable-plain)。

  • scram 启用 SCRAM 插件 (--enable-scram)。这需要通过 openssl-sys crate 链接 OpenSSL。

注意,指定任何这些功能都意味着 vendored

为了方便起见,openssl-sys crate 的 vendored 功能被重新导出为 openssl-vendored 功能。此功能不太可能在除与 scram 功能一起使用之外的情况下有用。

最终目标是让每个libsasl2功能都有一个同名Cargo功能的暴露。欢迎对此方面的拉取请求。

系统

如果没有启用vendored Cargo功能,sasl2-sys将在几个标准位置搜索libsasl2库和头文件。如果启用了pkg-config功能,默认情况下是启用的,则pkg-config将被查询以获取sasl2库的位置。

要覆盖自动搜索,请将SASL2_DIR环境变量设置为包含所需libsasl2目录的路径。

如果libsasl2目录的布局不是标准的,请将SASL2_LIB_DIRSASL2_INCLUDE_DIR环境变量分别设置为包含libsasl2库和头文件的目录的路径。如果设置了这些环境变量,则它们将优先于SASL2_DIR

当链接到系统库时,除非设置了SASL2_STATIC环境变量,否则首选动态链接。

平台支持

上游支持大多数主要平台,但sasl2-sys仅在Ubuntu、macOS和Windows的最近版本上进行了测试。欢迎提交改进其他平台支持的补丁。

依赖

~0–4.5MB
~92K SLoC