Benjamin Brittain | 8d8d8f3 | 2021-09-28 10:00:50 -0400 | [diff] [blame] | 1 | bssl-sys |
| 2 | ============ |
| 3 | |
| 4 | 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. |
| 5 | |
| 6 | ### How it works |
Benjamin Brittain | ea46caf | 2022-01-20 15:50:12 -0500 | [diff] [blame] | 7 | `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. |
| 8 | |
| 9 | ### To Use |
| 10 | Build `boringssl` with `-DRUST_BINDINGS=<rust-triple>` and ensure that you have `bindgen` installed. |
| 11 | |
| 12 | The `rust-triple` option should be one of the supported targets at https://doc.rust-lang.org/nightly/rustc/platform-support.html. |
Benjamin Brittain | 8d8d8f3 | 2021-09-28 10:00:50 -0400 | [diff] [blame] | 13 | |