From 0f830f8623760da6137faf9fbb578c838c4da03c Mon Sep 17 00:00:00 2001 From: MXWXZ Date: Fri, 30 Aug 2024 19:40:59 +0800 Subject: [PATCH] add cross build dep --- Cargo.toml | 16 ---------------- Cross.toml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 Cross.toml diff --git a/Cargo.toml b/Cargo.toml index 041d142..da7814d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,19 +16,3 @@ resolver = "2" [profile.release] lto = true codegen-units = 1 - -[workspace.metadata.cross.target.i686-unknown-linux-gnu] -pre-build = [ - "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_32.zip", - "unzip protoc-27.3-linux-x86_32.zip -d $HOME/.local", - "rm protoc-27.3-linux-x86_32.zip", - "mv $HOME/.local/bin/* /usr/bin/", -] - -[workspace.metadata.cross.target.aarch64-unknown-linux-gnu] -pre-build = [ - "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-aarch_64.zip", - "unzip protoc-27.3-linux-aarch_64.zip -d $HOME/.local", - "rm protoc-27.3-linux-aarch_64.zip", - "mv $HOME/.local/bin/* /usr/bin/", -] diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..02ae37d --- /dev/null +++ b/Cross.toml @@ -0,0 +1,15 @@ +[target.i686-unknown-linux-gnu] +pre-build = [ + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_32.zip", + "unzip protoc-27.3-linux-x86_32.zip -d $HOME/.local", + "rm protoc-27.3-linux-x86_32.zip", + "mv $HOME/.local/bin/* /usr/bin/", +] + +[target.aarch64-unknown-linux-gnu] +pre-build = [ + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-aarch_64.zip", + "unzip protoc-27.3-linux-aarch_64.zip -d $HOME/.local", + "rm protoc-27.3-linux-aarch_64.zip", + "mv $HOME/.local/bin/* /usr/bin/", +]