Skip to main content

Crate wolfssl_src

Crate wolfssl_src 

Source
Expand description

Compile wolfSSL from source.

This crate provides a Build API for compiling the wolfSSL C library from source via the cc crate. It is used by wolfcrypt-sys when the vendored feature is enabled (similar to the openssl-src / openssl-sys pattern).

§Usage

let artifacts = wolfssl_src::Build::new().build();
println!("lib dir: {}", artifacts.lib_dir.display());
println!("include dir: {}", artifacts.include_dir.display());

The builder discovers wolfSSL sources in order:

  1. source_dir() programmatic override
  2. WOLFSSL_SRC environment variable
  3. Bundled submodule at wolfssl-src/wolfssl/ (present after git submodule update --init)
  4. pkg-config (looks for a wolfssl package whose prefix contains source files)

Structs§

Artifacts
Result of a successful wolfSSL build.
Build
Builder for compiling wolfSSL from source.

Functions§

parse_defines
Parse a C header and return all #defined macro names.