#!/bin/sh # Source this to get the local Go toolchain that TinyGo drives, then: # . ./scripts/env.sh && make build # # TinyGo invokes `go` to locate and compile the standard library sources, so a # Go installation must be on PATH even though the relay itself is built by # TinyGo. if [ -x "$HOME/.local/goroot/bin/go" ]; then GOROOT="$HOME/.local/goroot" export GOROOT PATH="$GOROOT/bin:$PATH" export PATH fi if ! command -v go >/dev/null 2>&1; then echo "scripts/env.sh: no Go toolchain found; install Go 1.25+ or place it in ~/.local/goroot" >&2 fi if ! command -v tinygo >/dev/null 2>&1; then echo "scripts/env.sh: tinygo not found on PATH" >&2 fi