mirror of
https://github.com/Dasharo/vboot.git
synced 2026-03-06 14:48:35 -08:00
This adds Rust bindings to vboot_reference. BRANCH=none BUG=b:214081328 TEST=cargo build Change-Id: I4f9df36a0de93c0617ead2a75ef2ca5fcf8f5652 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3390514 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Rust bindings for vboot_reference
This path contains the vboot_reference-sys crate which uses bindgen to generate Rust bindings for the vboot_reference C library.
Each header is included as its own submodule. To use these bindings:
- Add
vboot_reference-systo yourCargo.tomlfor example:
[dependencies]
vboot_reference-sys = { path = "../../vboot_reference/rust/vboot_reference-sys" }
- Include the symbols you need for example:
use vboot_reference_sys::crossystem::*;
The build.rs in vboot_reference-sys takes care of adding the necessary
includes and linker flags for vboot_host through the pkg-config crate.