Files
Atsika 5b21bc7cda Add WASM agent support for JavaScript runtimes
Compile the agent to WebAssembly for deployment in JS runtimes (Bun,
Node.js, or any runtime implementing the TCPDial/UDPListen interface).

- Split network and UDP code with js/native build tags
- Extract UDP relay into a platform-agnostic shared layer
- Expose runtime-agnostic TCPDial and UDPListen JS hooks
- Add azure-sdk-for-go fork as submodule for WASM-compatible mmf fallback
- Bump aznet dependency
- Document WASM build and JS interface in README
2026-03-21 19:45:24 +01:00

21 lines
455 B
Makefile

.PHONY: all clean proxy agent wasm
ifndef TOKEN
CONN_STRING ?=
else
CONN_STRING = -X 'main.ConnString=$(TOKEN)'
endif
all: clean proxy agent wasm
proxy:
go build -ldflags="-s -w" -trimpath -o proxy cmd/proxy/main.go
agent:
go build -ldflags="-s -w $(CONN_STRING)" -trimpath -o agent cmd/agent/main.go
wasm:
GOOS=js GOARCH=wasm go build -ldflags="-s -w $(CONN_STRING)" -trimpath -o agent.wasm cmd/agent/main.go
clean:
rm -f proxy agent agent.wasm