-
Notifications
You must be signed in to change notification settings - Fork 638
Compiling
Rust 1.27.0 or later is required to build librespot.
Please install rust using rustup
If you are building librespot on macOS, the homebrew provided rust may fail due to the way in which homebrew installs rust. In this case, uninstall the homebrew version of rust and use rustup, and librespot should then build.
A kernel version of 3.9 or higher is required, for versions below this please see here.
Building requires a C compiler, with portaudio.
On debian / ubuntu, the following command will install these dependencies :
sudo apt install build-essential portaudio19-dev
On Fedora systems, the following command will install these dependencies :
sudo dnf install portaudio-devel make gcc
On macOS, using homebrew :
brew install portaudio
Additionally requires pkg-config
and alsa
libs to be installed.
On debian / ubuntu, the following command will install these dependencies :
apt install libasound2-dev pkg-config
Once you've cloned this repository you can build librespot using cargo
.
cargo build --release
The default for librespot is to build with portaudio-backend
, and to use lewton as the decoder (pure rust vorbis implementation).
Flag | Feature |
---|---|
alsa-backend |
Support for alsa. |
portaudio-backend |
Support for PortAudio . |
pulseaudio-backend |
Support for PulseAudio. |
jackaudio-backend |
Support for JACK. |
with-tremor |
A fixed point Vorbis decoder. |
with-vorbis |
Rust libvorbis bindings. |
with-dns-sd |
Builds librespot with dns-sd instead of the default mDNS. |