C Libraries
The C bindings expose Media over QUIC to C and C++ applications. Built on top of the Rust moq-net crate via FFI, with no Rust toolchain required at link time.
Libraries
libmoq
A C-callable shared and static library exposing the MoQ pub/sub API. Header files are generated by cbindgen and ship alongside the prebuilt binaries.
Features:
- Static (
libmoq.a) and dynamic (libmoq.so/libmoq.dylib/moq.dll) library targets - Auto-generated C header (
moq.h) - No Rust runtime exposed to consumers
- Works with any toolchain that can link a C library (CMake, Make, Meson, etc.)
Installation
From source
bash
git clone https://github.com/moq-dev/moq
cd moq/rs/libmoq
cargo build --releaseThe library will be in target/release/libmoq.a (static) and target/release/libmoq.{so,dylib,dll} (dynamic). The C header is emitted as target/release/moq.h.
From prebuilt releases
Prebuilt binaries are attached to each libmoq-v* release for the major Tier 1 targets.
Use cases
- C/C++ applications integrating MoQ without a Rust toolchain
- Bindings for other languages that aren't already covered by Python, Kotlin, Swift, or Go
- Legacy systems and embedded targets where pulling in Rust at build time is impractical
Source and issues
- Source: rs/libmoq/
- API reference: docs.rs/libmoq