Skip to content

bongodevs/Rustalink

Repository files navigation

Rustalink Logo

Rustalink

Development-first, high-performance audio node for Discord.

Release Build Status License
Language Platform Stars


Rustalink is a standalone audio sending node optimized for modern Discord bots. It provides a robust, low-latency bridge between your bot and multiple audio providers, following the Lavalink v4 specification for seamless integration.

Features

Our core engine is built for efficiency, allowing thousands of concurrent streams with minimal resource consumption.

  • Infrastructure
    • Asynchronous, non-blocking I/O
    • Sub-millisecond player precision
    • State-persistence for session recovery
    • Native cross-platform support
    • Real-time hardware-accelerated filters

Supported Platforms

Rustalink distinguishes between direct native playback and intelligent mirroring to ensure maximum availability.

Native

Direct stream extraction and resolution.

  • YouTube
  • SoundCloud
  • Deezer
  • Qobuz
  • JioSaavn
  • Gaana
  • Bandcamp
  • MixCloud
  • Audiomack
  • Reddit
  • HTTP / Local

Mirroring

Resolution of metadata-only sources via secondary providers.

  • Spotify
  • Apple Music
  • Tidal
  • Yandex
  • Shazam
  • Anghami
  • Pandora
  • Last.fm

Utilities

  • Text-to-Speech

Major Dependencies

Rustalink leverages a modern Rust ecosystem to provide high-performance audio processing:

  • Tokio: High-performance asynchronous runtime.
  • Axum: Erskine web framework for the control plane.
  • Symphonia: Pure Rust audio decoding and media demuxing.
  • Reqwest: Reliable HTTP client for metadata and stream fetching.
  • Davey: Custom Discord DAVE protocol implementation.
  • Audiopus: High-performance Opus codec bindings.
  • Prometheus: Real-time metrics and monitoring.

Quick Start (Docker)

Docker is the recommended way to run Rustalink.

# 1. Pull the image
docker pull ghcr.io/bongodevs/rustalink:latest

# 2. Setup config
mkdir rustalink && cd rustalink
docker run --rm ghcr.io/bongodevs/rustalink:latest cat config.example.toml > config.toml

# 3. Running with Docker Compose
# Create a docker-compose.yml file:
services:
  rustalink:
    image: ghcr.io/bongodevs/rustalink:latest
    ports: ["2333:2333"]
    volumes: ["./config.toml:/app/config.toml", "./logs:/app/logs"]
    restart: unless-stopped

Build Docker Image from Source

If you'd rather build the Docker image yourself from local source instead of pulling a pre-built image:

git clone https://github.com/bongodevs/rustalink.git
cd rustalink

# Build image from source (compiles Rust inside Docker — no local Rust toolchain needed)
docker build --target local -t rustalink:dev .

# Run it
docker run -p 2333:2333 -v ./config.toml:/app/config.toml rustalink:dev

Note

The --target local flag triggers a full in-container Rust build. This takes longer than pulling the pre-built image but requires no local Rust installation.

For native installation (Windows, Linux, macOS), see the Releases page.


Building from Source

Requirements

  • Rust: Latest stable version is required.

Linux (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install -y build-essential cmake pkg-config libssl-dev clang

macOS

brew install cmake pkg-config
# Ensure Xcode Command Line Tools are installed:
xcode-select --install

Windows


git clone https://github.com/bongodevs/rustalink.git
cd rustalink
cargo build --release

The compiled binary will be at target/release/rustalink.

Credits & Inspiration

Rustalink is an independent reimplementation in Rust and does not copy source code from the following projects. We acknowledge their design and architectural influence:

  • Lavalink (MIT License) — The original standalone audio node. Rustalink implements the Lavalink v4 protocol and draws inspiration from its player management, session handling, and event emission design.

About

Rustalink is a high-performance, standalone Discord audio sending node written in Rust. Designed for efficiency, reliability, and modern features.

Topics

Resources

License

Stars

Watchers

Forks

Packages