From b39f13b81d6d1415b4f76d93d1ee485076b61d99 Mon Sep 17 00:00:00 2001 From: Scott Opell Date: Thu, 14 Mar 2024 18:52:13 +0000 Subject: [PATCH] Maybe cargo cross isn't supported? Try explicit config file --- Cargo.toml | 29 ----------------------------- Cross.toml | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 Cross.toml diff --git a/Cargo.toml b/Cargo.toml index 761972177..7cb61a1aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,35 +24,6 @@ tokio = { version = "1.32" } tracing = { version = "0.1" } uuid = { version = "1.6", default-features = false, features = ["v4", "serde"] } -# Ref https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images -[workspace.metadata.cross.target.aarch64-unknown-linux-gnu] -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" -] -[workspace.metadata.cross.target.aarch64-unknown-linux-musl] -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" -] -[workspace.metadata.cross.target.x86_64-unknown-linux-gnu] -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" -] -[workspace.metadata.cross.target.x86_64-unknown-linux-musl] -pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" -] -[workspace.metadata.cross.target.x86_64-apple-darwin] -pre-build = [ - "brew install protobuf" -] -[workspace.metadata.cross.target.aarch64-apple-darwin] -pre-build = [ - "brew install protobuf" -] [profile.release] lto = true # Optimize our binary at link stage. diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 000000000..87a9f5c47 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,29 @@ +# Ref https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images +[target.aarch64-unknown-linux-gnu] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" +] +[target.aarch64-unknown-linux-musl] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" +] +[target.x86_64-unknown-linux-gnu] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" +] +[target.x86_64-unknown-linux-musl] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH" +] +[target.x86_64-apple-darwin] +pre-build = [ + "brew install protobuf" +] +[target.aarch64-apple-darwin] +pre-build = [ + "brew install protobuf" +]