A Golang implementation of the Automatic Multicast Tunneling (AMT) protocol, as defined in RFC 7450.
go get github.com/blockcast/go-amtBy default, go-amt uses a pure-Go implementation that works everywhere without any dependencies.
To use the optimized Rust-based implementation via CGO:
- Build the Rust library from pim-multicast-gateway:
cd pim-multicast-gateway/packages/amt-protocol
make ffi- Install to system paths or provide library location:
# Option A: Install to system (requires sudo)
sudo cp target/release/libamt_protocol.so /usr/local/lib/
sudo cp include/amt_protocol.h /usr/local/include/
sudo ldconfig
# Option B: Provide paths via environment variables
export CGO_CFLAGS="-I/path/to/amt-protocol/include"
export CGO_LDFLAGS="-L/path/to/amt-protocol/target/release -lamt_protocol"- Build with CGO enabled:
CGO_ENABLED=1 go build| Build | Implementation | Requirements |
|---|---|---|
CGO_ENABLED=0 |
Pure Go | None |
CGO_ENABLED=1 (no lib) |
Pure Go | None (CGO files won't compile without library) |
CGO_ENABLED=1 + lib |
Rust FFI | libamt_protocol installed |
MIT