#!/bin/bash
# Build a minimal release binary without sqlite, grpc, or html features
# Expected size: ~3.2MB

set -e

cargo build --release --bin=wasot --no-default-features

# Show size
ls -lh target/release/wasot

# Install to system (optional)
if [ "$1" = "--install" ]; then
    sudo cp target/release/wasot /usr/local/bin/wasot
    echo "Installed to /usr/local/bin/wasot"
fi