New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lavalink-rs

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lavalink-rs

Lavalink API wrapper for discord audio playing

  • 0.14.1
  • PyPI
  • Socket score

Maintainers
1

An API Wrapper for lavalink. Compatible with all tokio 1.x based discord crates or asyncio based discord python libraries.

If you have questions, you can get support in the serenity, lavalink or hikari discord servers, or by opening an issue in the gitlab repository.

Documentation for the library can be found here for rust or here for python.

To-Do

0.15

  • Implement __anext__ to QueueRef
  • RoutePlanner API

Future

  • Improve documentation with examples, better formatting, and fill in missing data
  • Expand event logging
  • discord.py example
  • hata example
  • twilight-rs example
  • Gitlab CI Tests
  • Implement abstractions for ease of use
  • Region based node selection method

Done

  • native_tls backend
  • Player queues
  • Readbale player queues
  • Search engine helpers
  • Write basic cocumentation
  • Songbird utilities
  • Serenity utilities
  • Twilight utilities
  • Load balancer node selection method
  • Lavasnek (PyO3)
  • Lavasnek events
  • Remove third party dependency for custom user data.
  • Round-Robin node selection method
  • Main and fallback node selection method
  • CPU Load based node selection method
  • Memory usage based node selection method
  • Custom node selection method
  • Python stubs
  • Basic Twilight 0.16 support
  • Hide password from logs
  • hikari-lightbulb example
  • Implement python builders for all the needed model structures
  • Expose Http and methods to python
  • Switch from reqwests to hyper
  • Implement SSL support with hyper
  • Implement search utilities to python
  • load_tracks to return Track in python
  • Streamable queue reader
  • Support tokio-websockets
  • native and webpki roots for rustls feature separation
  • Update PyO3 to 0.23

To install Lavalink, you can follow their getting started guide.

How to use

This is how you can install the library to be used.

Rust

You can install the latest version from crates.io:

lavalink-rs = "0.14"

# or

[dependencies.lavalink-rs]
version = "0.14"

Or the development release:

lavalink-rs = { git = "https://gitlab.com/vicky5124/lavalink-rs/", branch = "main"}

# or

[dependencies.lavalink-rs]
git = "https://gitlab.com/vicky5124/lavalink-rs/"
branch = "main"

If you wish to use a development version of songbird (or serenity, or twilight-model), add the following to the Cargo.toml:

[patch.crates-io.songbird]
git = "https://github.com/serenity-rs/songbird"
branch = "next"

[dependencies.songbird]
git = "https://github.com/serenity-rs/songbird"
branch = "next"

Python

You can install the latest version from pypi by using python3 -m pip install lavalink_rs.

OSArchPython VersionsSupported?
Windowsx863.8-3.13
Windowsx643.8-3.13
Windowsaarch64-
Mac OSx86_643.8-3.13
Mac OSaarch643.8-3.13
Linuxx863.8-3.13
Linuxx86_643.8-3.13
Linuxarmv73.8-3.13
Linuxaarch643.8-3.13
Linuxppc64le-
Linuxs390x-

Building the library

You can build the library using cargo build

To build for python, you can use maturin instead.

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install maturin
maturin develop --target x86_64-unknown-linux-gnu

Features

  • macros: default feature - Adds procedural macros for ease of use.
  • python for python3.8+ support.

Use tokio-tungstenite as the websocket client (for Serenity):

  • tungstenite-rustls-native-roots: default feature - Use rustls with the system trusted roots.
  • tungstenite-rustls-webpki-roots: Use rustls with the Mozilla set of trusted roots.
  • tungstenite-native-tls Use the system native tls implementation.

Use tokio-websockets as the websocket client (for Twilight):

  • websockets-rustls-native-roots: Use rustls with the system trusted roots.
  • websockets-rustls-webpki-roots: Use rustls with the Mozilla set of trusted roots.
  • websockets-native-tls Use the system native tls implementation.

Discord library utilities:

Contributing

To contribute to the project, fork the gitlab repository and create a merge request over there. Make sure to update the changelog with whatever update you did to the library.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc