Add bindgen-related configuration and dependencies for cross-compilation

This commit introduces `bindgen-cli` installation and sets up `BINDGEN_EXTRA_CLANG_ARGS` passthrough in `Cross.toml`. It also updates the pre-build process with necessary packages (`clang`, `libclang-dev`), alternative compilers, and adds `aws-lc-rs` with `bindgen` support to `workflow-runner` dependencies.
This commit is contained in:
Till Wegmueller 2025-11-01 16:22:37 +01:00
parent 952262ede4
commit 821cfdf458
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,7 @@
# Cross configuration for building the workflow runner for VM targets
# Reference: https://github.com/cross-rs/cross
[build.env]
passthrough = ["BINDGEN_EXTRA_CLANG_ARGS", "BINDGEN_EXTRA_CLANG_ARGS=-I/usr/lib/llvm-13/lib/clang/13.0.0/include"]
[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
@ -10,5 +12,8 @@ image = "ghcr.io/cross-rs/x86_64-unknown-illumos:main"
[build]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install --assume-yes protobuf-compiler"
"apt-get update && apt-get install --assume-yes protobuf-compiler libclang-dev clang build-essential",
"cargo install --force --locked bindgen-cli",
"update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100",
"update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100"
]

View file

@ -18,3 +18,4 @@ serde_yaml = "0.9"
# gRPC client
tonic = { version = "0.14", features = ["transport"] }
tokio-stream = "0.1"
aws-lc-rs = { version = "1", features = ["bindgen"] }