btw: MoQ is under active development. The APIs and protocols are still evolving and will change. Most of this documentation is AI generated until things get more stable.

Skip to content

Go Libraries

The Go bindings expose Media over QUIC to Go applications via cgo. Built on the same Rust core (moq-ffi) as the Python, Kotlin, and Swift packages, generated with uniffi-bindgen-go.

Packages

moq

The ergonomic wrapper, and the package most callers want. Idiomatic Go over the raw bindings: context.Context cancellation, Go error returns, and Go 1.23 iter.Seq2 iterators for live streams. The wrapper itself is hand-written Go; the native libraries come transitively from moq-ffi, so a build still needs CGO_ENABLED=1.

Learn more

moq-ffi

The raw UniFFI bindings (MoqClient, MoqSession, etc.) with blocking methods, plus the prebuilt libmoq_ffi.a per platform, linked statically through cgo. Released lockstep with the moq-ffi crate. Most callers use moq instead.

Supported platforms:

  • linux/amd64, linux/arm64
  • darwin/arm64 (macOS 12.3+)
  • windows/amd64

Learn more

Installation

bash
go get github.com/moq-dev/moq-go@latest
go
import "github.com/moq-dev/moq-go/moq"

cgo picks the right libmoq_ffi.a automatically via build tags; no LD_LIBRARY_PATH or extra setup required. Building requires CGO_ENABLED=1 (the default on Unix). @latest always pulls the newest native core: CI re-publishes the wrapper with its moq-ffi require bumped on every release.

Source and issues

Licensed under MIT or Apache-2.0