librespot-org / librespot

Open Source Spotify client library
MIT License
4.7k stars 573 forks source link

Assuming I just compiled a debug build...?? #1126

Closed microfx closed 1 year ago

microfx commented 1 year ago

Hey!

In the COMPILING.md is written:


Assuming you just compiled a debug build, you can run librespot with the following command:

./target/debug/librespot

...so apparently I have built a debug build. And I don't know why. Can anyone tell me? :D I don't want to have a 278 MB binary. The instructions are really not understandable ... I'm not a dev and don't want / need a debug build probably.

cargo build -j 3 --no-default-features --features rodiojack-backend --locked

this is how I build. Any ideas how to not have a debug build?

kingosticks commented 1 year ago

cargo build --help has lots of help. There's also documentation at https://doc.rust-lang.org/cargo/commands/cargo-build.html

Add the --release flag to your command to build an optimised version. It'll perfom better than a debug build, which is usually far more important than the size of the binary but there are ways to make it smaller.

Next time, maybe post a new discussion topic rather than an issue. Issues are generally for bugs and feature requests. I don't think we need to reproduce general Rust documentation here.

microfx commented 1 year ago

Okay, thanks for the super quick help! Will do – not too familiar with all of this wizardry!