https://boringssl-review.googlesource.com/c/boringssl/+/66288 allowed C++ runtime in libssl. The build script of bssl-sys crate should indicate that the crate requires a C++ runtime. Use libc++ on MacOS and libstdc++ on other unix like systems by default. Introduce a new environment variable to configure C++ runtime to use. Change-Id: Ib445955012126080dd03ad7b650287ea9dde10b0 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67147 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
bssl-sys
A low-level binding crate for Rust that moves in lockstop with BoringSSL.
How it works
bssl-sys uses bindgen as part of the cmake build process to generate Rust compatibility shims for the targeted platform. It is important to generate it for the correct platform because bindgen uses LLVM information for alignment which varies depending on architecture.
To Use
- Build
boringsslwith-DRUST_BINDINGS=<rust-triple>, which should match the Rust target triple when buildingbssl-sys, - install
bindgen, and - install
cargo-deny.
After that, the bssl-sys crate can be built. By default, it looks for bindgen output and BoringSSL static libraries in the build directory. This can be reconfigured with BORINGSSL_BUILD_DIR environment variable. Note the environment variable is evaluated relative to rust/bssl-sys/src, so using an absolute path may be more convenient.