The C11 change has survived for three months now. Let's start freely using static_assert. In C files, we need to include <assert.h> because it is a macro. In C++ files, it is a keyword and we can just use it. (In MSVC C, it is actually also a keyword as in C++, but close enough.) I moved one assert from ssl3.h to ssl_lib.cc. We haven't yet required C11 in our public headers, just our internal files. Change-Id: Ic59978be43b699f2c997858179a9691606784ea5 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53665 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Bob Beck <bbe@google.com> Reviewed-by: Bob Beck <bbe@google.com>
bssl-sys
A low-level binding crate for Rust that moves in lockstop with BoringSSL. BoringSSL explicitly does not have a stable ABI, bssl-sys is the solution for preventing subtle-memory corruption bugs due to version skew.
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. These files are then packaged into a Rust crate.
To Use
Build boringssl with -DRUST_BINDINGS=<rust-triple> and ensure that you have bindgen installed.
The rust-triple option should be one of the supported targets at https://doc.rust-lang.org/nightly/rustc/platform-support.html.