Skip to main content

Installation

Moq provides libraries for both Rust and TypeScript/JavaScript, allowing you to build native applications or browser-based solutions.

Choose Your Language

Rust Installation

Moq provides several Rust crates for different use cases.

Prerequisites

  • Rust 1.70 or later
  • Cargo (comes with Rust)

Core Libraries

[dependencies]
moq-lite = "0.15.0"

Available Crates

CrateVersionDescription
moq-lite0.15.0Core pub/sub transport protocol with built-in concurrency and deduplication
hang0.15.1Media-specific encoding/streaming layered on top of moq-lite
moq-nativeLatestOpinionated helpers to configure a Quinn QUIC endpoint
moq-tokenLatestAuthentication scheme with JWT token support
moq-muxLatestMedia muxers and demuxers (fMP4/CMAF, HLS)
libmoqLatestC bindings for moq-lite

Installing CLI Tools

Moq provides command-line tools for publishing and token generation:
cargo install --git https://github.com/moq-dev/moq moq-cli

Optional Features

Some crates support optional features:
Cargo.toml
[dependencies]
moq-lite = { version = "0.15.0", features = ["serde"] }
moq-native = { version = "0.5", features = ["iroh"] }
Available features:
  • serde - Enable serialization support
  • iroh - Enable P2P connections via iroh
  • quinn - Use Quinn as QUIC backend (default)
  • quiche - Use Quiche as QUIC backend

Documentation

View Rust documentation:
cargo doc --open
Or visit docs.rs for online documentation:

Verifying Installation

Create a simple test to verify your installation:
main.rs
use moq_lite::Origin;

fn main() {
    let origin = Origin::new();
    println!("Moq origin created successfully!");
}
Run it:
cargo run

Development Setup

If you want to contribute to Moq or modify the source code:
1

Clone the repository

git clone https://github.com/moq-dev/moq.git
cd moq
2

Install development dependencies

just install
3

Build everything

just build
4

Run tests

just check

Platform-Specific Notes

On macOS, you may need to install additional dependencies:
brew install just ffmpeg
On Linux, ensure you have development headers:Ubuntu/Debian:
sudo apt-get install build-essential pkg-config libssl-dev ffmpeg
Fedora:
sudo dnf install gcc pkg-config openssl-devel ffmpeg
Windows support is experimental. We recommend using WSL2 (Windows Subsystem for Linux) for the best experience:
wsl --install
Then follow the Linux installation instructions inside WSL.

Next Steps

Quick Start

Run the demo application

Architecture

Understand Moq’s layered design

Publishing

Start publishing media streams

Watching

Subscribe to and watch streams

Build docs developers (and LLMs) love