Compile Rust from LibreELEC Build System

  • Hi,


    Is it possible to compile a program written in Rust from within the LibreELEC Build System?


    I'm working on an addon using librespot and I currently just copy pre-built binaries when building the addon.


    Thanks,
    Shane

  • Hi Shane,


    I had a look at your addon: it looks very promising, indeed! Thank you!
    I also had a look at Rust, and it should be possible to include it in LibreELEC.


    I however suggest the following course of action:
    1. improve your addon around librespot binaries and submit it to LibreELEC
    2. then only add Rust to LibreELEC and use it to build librespot.


    I already have taken the liberty to tidy up your addon, and to create pakages for its dependencies (pyalsaaudio, share libogg and libvorbis).
    I will push my work to my github today or tomorrow.


    Looking forward to contributing to your work!

  • Hi awiouy,


    Your suggestions are probably the right way to go and thanks for having a look. The addon definitely could do with a clean up, although my coding is limited to borrowing bits (mainly from your Spotify Connect Web addon so you'll recognise the code :D ) and hacking it together so glad to have the help. I'll keep an eye on github.

  • wip is here.
    libogg/libvorbis do not seem to be required (ldd librespot does not show them).
    wizard could use librespot output rather than pyalsaaudio, but I did not manage to list devices/mixers. Any success with that?

  • Thanks pushing this forward awiouy . I haven't had much time lately to help.


    libogg/libvorbis do not seem to be required (ldd librespot does not show them).

    I've had mixed results with leaving libogg and libvorbis out (remove both twice, only to have to re-add them). With your current pull request on x86_64 (librespot: initial addon by awiouy · Pull Request #1622 · LibreELEC/LibreELEC.tv · GitHub), I get ERROR:librespot::player: Vorbis error: InvalidSetup in the output randomly. Tracks still play and even with the same track, it doesn't always occur.


    wizard could use librespot output rather than pyalsaaudio, but I did not manage to list devices/mixers. Any success with that?

    Are you referring to --devices ?? This never worked for me either.