# Cross-compilation configuration for `cross` (https://github.com/cross-rs/cross).
#
# This file is auto-detected by `cross` from the repo root. No Cargo.toml
# edits required.
# Host build-scripts (proc-macro2, quote, …) compile for the runner triple
# and honor `.cargo/config.toml` which sets linker=clang + lld. Install both
# inside the cross image so those scripts link. Also install protoc for tonic.
# x86_64-unknown-linux-musl
[target.x86_64-unknown-linux-musl]
pre-build = [
"apt-get update",
"apt-get install -y --no-install-recommends protobuf-compiler clang lld",
]
# aarch64-unknown-linux-gnu: pin :main for glibc 2.30+ (serde_core etc.)
[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
pre-build = [
"apt-get update",
"apt-get install -y --no-install-recommends protobuf-compiler clang lld",
]