Skip to content

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

License

Notifications You must be signed in to change notification settings

bongodevs/Rustalink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rustalink Logo

Rustalink

Release Build Status License
Language Platform Stars


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


Key Features

  • πŸš€ High Performance: Built with Rust for minimal overhead and maximum throughput.
  • 🎡 Extensive Source Support: Native support for 15+ audio platforms.
  • πŸ”„ Smart Mirroring: Automatically find audio for metadata-only sources (Spotify, Apple Music, etc.).
  • πŸ“Ί Advanced YouTube Support: Toggle between multiple clients (WEB, ANDROID, IOS, TV) to bypass restrictions.
  • 🐳 Docker Ready: One-command deployment with pre-configured environments.
  • πŸ›  Highly Configurable: Fine-tune every aspect of the server via config.toml.

Supported Sources

Rustalink supports direct playback and Mirroring. Mirroring allows playback from metadata-only services by automatically finding the best audio match from your configured mirror providers.

Source Type Search Prefix Features
YouTube Direct ytsearch:, ytmsearch: ytrec:, Lyrics
SoundCloud Direct scsearch: -
Spotify Mirror spsearch: sprec:
Apple Music Mirror amsearch: -
Deezer Hybrid dzsearch:, dzisrc: dzrec:, Lyrics
Tidal Mirror tdsearch: tdrec:
Qobuz Hybrid qbsearch:, qbisrc: qbrec:
Bandcamp Direct bcsearch: -
MixCloud Direct mcsearch: -
JioSaavn Hybrid jssearch: jsrec:
Gaana Hybrid gnsearch: -
Yandex Music Hybrid ymsearch: ymrec:, Lyrics
Audiomack Hybrid amksearch: -
Anghami Mirror agsearch: -
Shazam Mirror shsearch: -
Pandora Mirror pdsearch: pdrec:
Audius Direct ausearch:, audsearch: -
HTTP / Local Direct - -
Google TTS Direct gtts:, speak: gtts://lang:text to override language
Flowery TTS Direct ftts: ftts:// pattern supported. Override parameters via query ?voice=...
LazyPy TTS Direct lazypytts:, lazytts: lazypytts:// pattern supported. Override via format lazypytts:Service:Voice:Text

Tip

Hybrid sources support direct playback if credentials are provided. Otherwise, they seamlessly fall back to mirroring.

Text-to-Speech (TTS) Usage & Parameters

Rustalink features three distinct TTS sources with unique routing parameters:

  1. Google TTS (gtts: or speak:)

    • Uses standard Google Translate voices based on the config.toml language code.
    • You can also optionally override your language for a specific query by appending a colon after the gtts:// scheme or base prefix.
    • Examples:
      • Basic: gtts:Hello World
      • Custom Language: gtts://fr:Bonjour le monde or speak:es:Hola Mundo
  2. Flowery TTS (ftts:// or ftts:)

    • Capable of overriding your config.toml voice and speed settings on the fly utilizing URL query variables.
    • Available Parameters: voice, translate, silence, speed.
    • Examples:
      • Basic: ftts://Hello World
      • All Params: ftts://Hello World?voice=Bria&translate=false&silence=500&speed=1.5
  3. LazyPy TTS (lazypytts: or lazytts:)

    • Connects to various web TTS APIs. You can define the custom service and voice utilizing colon separators.
    • You can also use the lazypytts:// or lazytts:// pattern.
    • Examples:
      • Basic: lazypytts:Hello World
      • URL Style: lazypytts://Jorge:Hello World
      • Custom Service & Voice: lazypytts:Amazon:Matthew:Hello World

YouTube Playback Clients

Bypass restrictions by switching between specialized clients:

Client Alias Search Resolve Playback
WEB βœ… βœ… βœ…
MWEB / REMIX / MUSIC_WEB / WEB_REMIX βœ… βœ… βœ…
ANDROID βœ… βœ… βœ…
IOS βœ… βœ… βœ…
TV / TVHTML5 βœ… βœ… βœ…
TV_CAST / TVHTML5_CAST βœ… βœ… βœ…
TV_EMBEDDED / TVHTML5_EMBEDDED / TVHTML5_SIMPLY_EMBEDDED_PLAYER βœ… βœ… βœ…
MUSIC_ANDROID / MUSIC / ANDROID_MUSIC βœ… βœ… βœ…
ANDROID_VR / ANDROIDVR βœ… ❌ βœ…
WEB_EMBEDDED / WEBEMBEDDED βœ… ❌ βœ…
WEB_PARENT_TOOLS / WEBPARENTTOOLS βœ… βœ… ❌

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.default.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.
  • NodeLink (GPL-3.0) β€” Lightweight Lavalink alternative by PerformanC. Inspired Rustalink's approach to source handling and route planning.

See NOTICE for full third-party attribution details.


πŸ“„ License

Rustalink is published under the Apache License 2.0.
See the LICENSE file for more details.

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

 
 
 

Contributors