1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash # Build the optimized native library. set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" cd "$REPO_ROOT" BUILD_ARGS=(--release) if [[ -n "${TARGET:-}" ]]; then BUILD_ARGS+=(--target "$TARGET") fi cargo build "${BUILD_ARGS[@]}" "$@"