From 821cfdf4580219a28e9477cb8dca09097984dc7ff8680198ba941bb83e01d11b Mon Sep 17 00:00:00 2001 From: Till Wegmueller Date: Sat, 1 Nov 2025 16:22:37 +0100 Subject: [PATCH] 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. --- Cross.toml | 7 ++++++- crates/workflow-runner/Cargo.toml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cross.toml b/Cross.toml index e7e8bd2..4c70f43 100644 --- a/Cross.toml +++ b/Cross.toml @@ -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" ] \ No newline at end of file diff --git a/crates/workflow-runner/Cargo.toml b/crates/workflow-runner/Cargo.toml index 061aa93..7f50755 100644 --- a/crates/workflow-runner/Cargo.toml +++ b/crates/workflow-runner/Cargo.toml @@ -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"] } \ No newline at end of file