udpqueue.rs
This is a rust implementation of the original JDA-NAS natives. This can be used to make a minimal modular jar with only the required target natives.
Setup
Supported native platforms:
Linux x86 (intel):
Linux ARM (v7 and x64):
Windows x86 (intel):
MacOS/Darwin universal (x86 intel & aarch64 M1):
More platforms can be added on request. Linux shared libraries are compiled against GLIBC 2.18.
While this project is published to maven-central, the lavaplayer commons dependency is currently only available through jcenter. So you will have to depend on jcenter for now.
- Add the original jda-nas dependency to your project, and exclude
udp-queue
from its transitive dependencies:
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation("com.sedmelluq:jda-nas:1.1.0") {
exclude(module="udp-queue")
}
}
- Add udpqueue natives
dependencies {
// Fully modular, choose which platforms to use!
implementation("club.minnced:udpqueue-native-linux-x86-64:0.2.6") // adds linux 64bit
implementation("club.minnced:udpqueue-native-win-x86-64:0.2.6") // adds windows 64bit
}
Alternatively, you can also install rustup locally on your target platform and build it yourself.
Use ./install.sh <triplet>
to install the jar for your specific platform in maven local. Example: ./install.sh x86_64-unknown-linux-gnu
To add all supported platforms, you can use this:
dependencies {
implementation("club.minnced:udpqueue-native-linux-x86-64:0.2.6")
implementation("club.minnced:udpqueue-native-linux-x86:0.2.6")
implementation("club.minnced:udpqueue-native-linux-aarch64:0.2.6")
implementation("club.minnced:udpqueue-native-linux-arm:0.2.6")
implementation("club.minnced:udpqueue-native-win-x86-64:0.2.6")
implementation("club.minnced:udpqueue-native-win-x86:0.2.6")
implementation("club.minnced:udpqueue-native-darwin:0.2.6")
}