• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

src/22-Aug-2025-

CMakeLists.txt A D22-Aug-20252.8 KiB5652

Cargo.lock A D22-Aug-2025159 86

Cargo.toml A D22-Aug-2025356 1411

README.md A D22-Aug-20251.2 KiB1912

build.rs A D22-Aug-20254.1 KiB134103

rust_wrapper.c A D22-Aug-20251.1 KiB3716

rust_wrapper.h A D22-Aug-20251.5 KiB4216

wrapper.h A D22-Aug-20252.2 KiB8381

README.md

1bssl-sys
2============
3
4A low-level binding crate for Rust that moves in lockstop with BoringSSL.
5
6### How it works
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.
8
9### To Use
101. Build `boringssl` with `-DRUST_BINDINGS=<rust-triple>`, which should match the [Rust target triple](https://doc.rust-lang.org/nightly/rustc/platform-support.html) when building `bssl-sys`. For example, to build on 64-bit Linux:
11
12       cmake -GNinja -B build -DRUST_BINDINGS=x86_64-unknown-linux-gnu
13       ninja -C build
14
152. Install `bindgen`.
163. Install [`cargo-deny`](https://github.com/EmbarkStudios/cargo-deny).
17
18After that, the `bssl-sys` crate can be built via `cargo`. 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.
19