Initial MeshPort SDK and cross-platform client

This commit is contained in:
shenlei
2026-10-10 15:16:32 +09:00
commit e73e599165
664 changed files with 209894 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Optional: install build tools inside work/, leaving the user's shell unchanged.
set -eu
cd "$(dirname "$0")/.."
mkdir -p work/toolchain
curl --fail --location https://sh.rustup.rs -o work/toolchain/rustup-init.sh
export CARGO_HOME="$PWD/work/toolchain/cargo"
export RUSTUP_HOME="$PWD/work/toolchain/rustup"
sh work/toolchain/rustup-init.sh -y --profile minimal --no-modify-path
"$CARGO_HOME/bin/rustup" component add rustfmt clippy
case "$(uname -s)-$(uname -m)" in
Darwin-*) archive="protoc-31.1-osx-universal_binary.zip" ;;
Linux-x86_64) archive="protoc-31.1-linux-x86_64.zip" ;;
Linux-aarch64) archive="protoc-31.1-linux-aarch_64.zip" ;;
*) printf '%s\n' 'Install protoc for this platform manually.'; exit 1 ;;
esac
curl --fail --location "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/$archive" -o work/toolchain/protoc.zip
unzip -q -o work/toolchain/protoc.zip -d work/toolchain/protoc