diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..62f31eb --- /dev/null +++ b/Cross.toml @@ -0,0 +1,26 @@ +[build.env] +passthrough = ["BUF_CACHE_DIR=/tmp"] + +[target.x86_64-unknown-linux-gnu] +pre-build = [ + "apt-get update", + "apt-get install -y openssl ca-certificates pkg-config cmake libssl-dev curl", + "curl -sSL https://github.com/bufbuild/buf/releases/download/v1.47.2/buf-Linux-x86_64 -o /usr/local/bin/buf", + "chmod +x /usr/local/bin/buf", + "buf --version", + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-v25.1-linux-x86_64.zip -o /tmp/protoc.zip", + "unzip /tmp/protoc.zip -d /usr/local", + "protoc --version", +] + +[target.aarch64-unknown-linux-gnu] +pre-build = [ + "apt-get update", + "apt-get install -y openssl ca-certificates pkg-config cmake libssl-dev curl", + "curl -sSL https://github.com/bufbuild/buf/releases/download/v1.47.2/buf-Linux-aarch64 -o /usr/local/bin/buf", + "chmod +x /usr/local/bin/buf", + "buf --version", + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-v25.1-linux-aarch_64.zip -o /tmp/protoc.zip", + "unzip /tmp/protoc.zip -d /usr/local", + "protoc --version", +]