#!/bin/bash set -euo pipefail HOST=localhost PORT=9000 TSV_SRC=test-vid # ensure relatively predictable timing for spawn() cargo build PIDS=() cleanup() { for pid in "${PIDS[@]}"; do kill "$pid" 2>/dev/null || true done wait 2>/dev/null } trap cleanup EXIT spawn() { BIN="$1" shift cargo run --bin "$BIN" -- "$@" & PIDS+=($!) } spawn wgsl-render sleep 2 SHADER=' @group(1) @binding(0) var color: vec3f; @fragment fn fs_main(@location(0) uv: vec2) -> @location(0) vec4 { return vec4f(color, 1); } ' oscsend "$HOST" "$PORT" /module/package::main s "$SHADER" oscsend "$HOST" "$PORT" /entrypoint s package::main oscsend "$HOST" "$PORT" /uniform/package::main/color fff 1 0 0 cargo run --bin tsv-view