#kerberos #integration #build #directory #system #build-script #libkrb5

sys krb5-src

Build system integration for libkrb5, MIT's Kerberos implementation

11 releases

0.3.3+1.19.2 May 13, 2024
0.3.2+1.19.2 Jan 16, 2022
0.3.1+1.19.2 Dec 23, 2021
0.3.0+1.19.2 Nov 28, 2021
0.2.4+1.18.2 Jul 8, 2020

#639 in Database interfaces

Download history 7654/week @ 2024-02-26 7987/week @ 2024-03-04 7472/week @ 2024-03-11 7636/week @ 2024-03-18 8125/week @ 2024-03-25 7870/week @ 2024-04-01 7324/week @ 2024-04-08 8009/week @ 2024-04-15 8653/week @ 2024-04-22 5745/week @ 2024-04-29 10451/week @ 2024-05-06 7441/week @ 2024-05-13 8479/week @ 2024-05-20 4871/week @ 2024-05-27 6105/week @ 2024-06-03 6964/week @ 2024-06-10

26,676 downloads per month
Used in 9 crates (via sasl2-sys)


279K SLoC

C 252K SLoC // 0.2% comments Python 8K SLoC // 0.2% comments C++ 8K SLoC // 0.2% comments Perl 2K SLoC // 0.1% comments M4 2K SLoC // 0.3% comments ASN.1 1.5K SLoC // 0.2% comments GNU Style Assembly 1.5K SLoC Happy 1K SLoC INI 602 SLoC // 0.0% comments Bitbake 575 SLoC // 0.2% comments Shell 506 SLoC // 0.1% comments AWK 396 SLoC // 0.1% comments Visual Studio Project 338 SLoC Alex 245 SLoC SWIG 162 SLoC // 0.3% comments Rust 128 SLoC // 0.3% comments Emacs Lisp 104 SLoC // 0.3% comments Batch 69 SLoC Visual Studio Solution 60 SLoC

Contains (autotools obfuscated code, 520KB) krb5/src/configure, (obscure autoconf code, 50KB) krb5/src/configure.ac


crates.io CI Rust Documentation

Rust build system integration for libkrb5, MIT's Kerberos implementation.

View documentation.


# Cargo.toml
krb5-src = "0.3.3"


Build system integration for libkrb5, MIT's Kerberos implementation.

This crate builds a vendored copy of libkrb5 using Cargo's support for custom build scripts. It is not intended for direct consumption, but as a dependency for other crates that need libkrb5 available, like sasl2-sys.

krb5-src is currently bundling libkrb5 v1.19.2.

To use this crate, declare a dependency or dev-dependency on krb5-src. Then, in the build script for your crate, the environment variable DEP_KRB5_SRC_ROOT will point to the directory in which the bundled copy of libkrb5 has been installed. You can build and link another C library against this copy of libkrb5, or generate Rust bindings and link Rust code against this copy of libkrb5.

Note that you are responsible for instructing Cargo to link in the components of libkrb5 that you depend upon. Here is an example build script fragment.


Cargo features

krb5-src can be configured with the following Cargo features:

  • binaries builds the binaries that come with libkrb5 (kinit, kdestroy, et al.) and installs them into DEP_KRB5_SRC_ROOT/bin.

  • nls enables native language support (i.e., localization). This feature corresponds to the --enable-nls configure flag.

    On some platforms, when this feature is enabled, the application must additionally link against libintl.

  • openssl-vendored enables the vendored feature of the openssl-sys crate.

Note that none of these features have any effect when compiling on Windows.

Platform support

krb5-src is tested on recent versions of Ubuntu, macOS, and Windows. Patches that improve support for other platforms are welcome.