Documentation Index
Fetch the complete documentation index at: https://mintlify.com/moq-dev/moq/llms.txt
Use this file to discover all available pages before exploring further.
moq-lite is the core transport layer for Media over QUIC, providing a generic pub/sub protocol built on WebTransport and QUIC.
This crate implements a simplified subset of the IETF MoQ specification, focusing on practical features and deployability. It’s highly recommended to use
moq-lite instead of the full IETF standard until at least draft-30.Overview
moq-lite is designed for real-time live media delivery with sub-second latency at massive scale. It provides:- Broadcasts: Discoverable collections of tracks
- Tracks: Named streams of data, split into groups
- Groups: Sequential collections of frames, delivered out-of-order until expired
- Frames: Chunks of data with an upfront size
Installation
Add to yourCargo.toml:
Features
serde: Enable serialization support for data structures
Core API
The API is built around Producer/Consumer pairs with a clear hierarchy:Origin
A collection of broadcasts, produced by one or more sessions.Broadcast
A collection of tracks, produced by a single publisher.Track
A collection of groups, delivered out-of-order until expired.Group
A collection of frames, delivered in order until cancelled.Frame
Chunks of data with an upfront size.Client and Server
moq-lite provides low-level client and server implementations. For most use cases, usemoq-native which provides higher-level helpers.
Client
Connect to a relay as a client:Server
Accept connections as a server:Session
Represents an active MoQ connection:Complete Example
Architecture
moq-lite operates at the transport layer, below media-specific logic:Error Handling
All operations returnResult<T, moq_lite::Error>:
Resources
- Full API Documentation - Complete reference on docs.rs
- Crates.io - Package page
- Source Code - GitHub repository
- Specification - moq-lite protocol spec
- Examples - Code examples
Next Steps
moq-native
Helper library for native applications
hang
Media-specific layer built on moq-lite
Getting Started
Build your first application
moq-relay
Deploy a relay server