Files
seaweedfs/seaweed-vector/.cargo/protoc
T
Chris LuandClaude Opus 5.5 54777d7fb9 vector: build weed-vector without a system protoc (#12317)
* vector: build without a system protoc

lance's build scripts run $PROTOC and fail without one. Point it at the
protoc that protoc-bin-vendored ships, at the version in Cargo.lock, so
building inside seaweed-vector/ needs only the Rust toolchain. An explicit
PROTOC still wins, and a registry without the crate falls back to PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK

* test(s3vectors): build weed-vector inside its workspace

Cargo reads seaweed-vector/.cargo/config.toml only when it runs there, so
build from that directory to pick up the vendored protoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK

* ci(vector): drop the PROTOC step the workspace config replaces

Builds run inside seaweed-vector/, where the cargo config already points
lance at the vendored protoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK

* test(s3vectors): resolve CARGO_TARGET_DIR before changing directory

A relative CARGO_TARGET_DIR given to make would point cargo, which now runs
in seaweed-vector/, and the cp after it at different directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK

* vector: pick the vendored protoc on every Linux host it ships for

protoc-bin-vendored also carries ppc64le, s390x and x86_32 binaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:56:09 -08:00

22 lines
862 B
Bash
Executable File

#!/bin/sh
# Runs the protoc of the protoc-bin-vendored version in Cargo.lock, or the one
# on PATH when the registry does not hold it.
case "$(uname -s)-$(uname -m)" in
Linux-x86_64) platform=linux-x86_64 ;;
Linux-aarch64) platform=linux-aarch_64 ;;
Linux-ppc64le) platform=linux-ppcle_64 ;;
Linux-s390x) platform=linux-s390_64 ;;
Linux-i?86) platform=linux-x86_32 ;;
Darwin-x86_64) platform=macos-x86_64 ;;
Darwin-arm64) platform=macos-aarch_64 ;;
*) exec protoc "$@" ;;
esac
crate="protoc-bin-vendored-$platform"
version=$(awk -v name="\"$crate\"" '$1 == "name" && $3 == name { found = 1; next } found && $1 == "version" { gsub(/"/, "", $3); print $3; exit }' "$(dirname "$0")/../Cargo.lock")
for protoc in "${CARGO_HOME:-$HOME/.cargo}"/registry/src/*/"$crate-$version"/bin/protoc; do
if [ -x "$protoc" ]; then
exec "$protoc" "$@"
fi
done
exec protoc "$@"