A desktop media player for the MOQ (Media over QUIC) protocol, targeting draft-16 of the IETF MOQ Transport specification.
MOQZR is a two-layer application:
- Native layer (Zig) -- Handles QUIC transport and MOQ protocol logic. Built as a shared library (.dll / .dylib / .so) and accessed from the app via FFI.
- App layer (TypeScript) -- Electrobun desktop app with Bun runtime. Manages the UI, WebCodecs decoding, and audio/video rendering.
- Renderer sends IPC messages (connect, subscribe) to the main process
- Main process calls native FFI functions
- Native Zig library manages QUIC connection and MOQ sessions
- Main process polls frames from native layer at 60fps and forwards them to the renderer
- Renderer decodes frames with WebCodecs and renders video to canvas / audio via Web Audio API
- Bun >= 1.0.0
- Zig 0.16.0-dev (development version required)
- Electrobun (installed via npm)
The native library requires Zig 0.16.0-dev (not the stable release). Download the latest development build from the Zig downloads page:
macOS (Apple Silicon):
curl -L -o /tmp/zig.tar.xz "https://ziglang.org/builds/zig-aarch64-macos-0.16.0-dev.2694+74f361a5c.tar.xz"
tar -xf /tmp/zig.tar.xz -C /tmp
mkdir -p ~/bin && mv /tmp/zig-aarch64-macos-* ~/bin/zig-dev
export PATH="$HOME/bin/zig-dev:$PATH"macOS (Intel):
curl -L -o /tmp/zig.tar.xz "https://ziglang.org/builds/zig-x86_64-macos-0.16.0-dev.2694+74f361a5c.tar.xz"
tar -xf /tmp/zig.tar.xz -C /tmp
mkdir -p ~/bin && mv /tmp/zig-x86_64-macos-* ~/bin/zig-dev
export PATH="$HOME/bin/zig-dev:$PATH"Linux (x86_64):
curl -L -o /tmp/zig.tar.xz "https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.2694+74f361a5c.tar.xz"
tar -xf /tmp/zig.tar.xz -C /tmp
mkdir -p ~/bin && mv /tmp/zig-x86_64-linux-* ~/bin/zig-dev
export PATH="$HOME/bin/zig-dev:$PATH"Windows: Download from https://ziglang.org/builds/zig-x86_64-windows-0.16.0-dev.2694+74f361a5c.zip and extract to a folder in your PATH.
Note: The build script automatically uses
~/bin/zig-dev/zigif present, falling back to systemzig.
Verify installation:
zig version # Should show 0.16.0-dev.xxxxInstall dependencies:
bun installRun in development mode:
bun run devBuild for production:
bun run buildBuild output is placed in build/<target>/ (e.g., build/dev-macos-arm64/MOQZR Player-dev.app).
bun run build:windows
bun run build:macos
bun run build:linuxcd native
~/bin/zig-dev/zig build # build library
~/bin/zig-dev/zig build test # run tests
~/bin/zig-dev/zig build run -- [args] # CLI toolOr if zig-dev is in your PATH:
cd native && zig buildsrc/
main/ Main process (Bun runtime)
native/ FFI bindings to Zig library
ipc.ts IPC handler registry
index.ts App entry point
renderer/ Renderer process (browser)
player.ts Player orchestration
decoder.ts WebCodecs video/audio decoders
renderer.ts Canvas and Web Audio rendering
controls.ts UI controls and keyboard shortcuts
shared/
types.ts Shared type definitions
native/
src/
root.zig FFI exports (C-compatible API)
cli.zig Standalone CLI for testing
moq/ MOQ protocol implementation
transport/ QUIC transport client
loc/ LOC demuxer for media frames
See LICENSE for details.