Installation
Moq provides libraries for both Rust and TypeScript/JavaScript, allowing you to build native applications or browser-based solutions.Choose Your Language
- Rust
- TypeScript/JavaScript
Rust Installation
Moq provides several Rust crates for different use cases.Prerequisites
- Rust 1.70 or later
- Cargo (comes with Rust)
Core Libraries
Available Crates
| Crate | Version | Description |
|---|---|---|
| moq-lite | 0.15.0 | Core pub/sub transport protocol with built-in concurrency and deduplication |
| hang | 0.15.1 | Media-specific encoding/streaming layered on top of moq-lite |
| moq-native | Latest | Opinionated helpers to configure a Quinn QUIC endpoint |
| moq-token | Latest | Authentication scheme with JWT token support |
| moq-mux | Latest | Media muxers and demuxers (fMP4/CMAF, HLS) |
| libmoq | Latest | C bindings for moq-lite |
Installing CLI Tools
Moq provides command-line tools for publishing and token generation:Optional Features
Some crates support optional features:Cargo.toml
serde- Enable serialization supportiroh- Enable P2P connections via irohquinn- Use Quinn as QUIC backend (default)quiche- Use Quiche as QUIC backend
Documentation
View Rust documentation:Verifying Installation
- Rust
- TypeScript
Create a simple test to verify your installation:Run it:
main.rs
Development Setup
If you want to contribute to Moq or modify the source code:Platform-Specific Notes
macOS
macOS
On macOS, you may need to install additional dependencies:
Linux
Linux
On Linux, ensure you have development headers:Ubuntu/Debian:Fedora:
Windows
Windows
Windows support is experimental. We recommend using WSL2 (Windows Subsystem for Linux) for the best experience: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