Rustdesk Compilation

Hello, I would like to make modifications to RustDesk, such as changing the icons and the application's name, for example. I'm trying to compile RustDesk, but I'm encountering an error that I can't resolve. During compilation, I get the following message:

"error: failed to run custom build command for magnum-opus v0.4.0 (https://github.com/rustdesk/magnum-opus#5cd2bf98)

Caused by:
process didn't exit successfully: C:\Users\JEREMY\desktop\rustdesk-master\target\debug\build\magnum-opus-e7b516bc7076020d\build-script-build (exit code: 101)
--- stdout
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=opus
cargo:rustc-link-search=C:\Users\JEREMY\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\JEREMY\vcpkg\installed\x64-windows-static\include
rerun-if-changed=C:\Users\JEREMY.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\5cd2bf9\opus_ffi.h
rerun-if-changed=C:\Users\JEREMY\vcpkg\installed\x64-windows-static\include

--- stderr
C:\Users\JEREMY.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\5cd2bf9\opus_ffi.h:1:10: fatal error: 'opus/opus_multistream.h' file not found
C:\Users\JEREMY.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\5cd2bf9\opus_ffi.h:1:10: fatal error: 'opus/opus_multistream.h' file not found, err: true
thread 'main' panicked at 'called Result::unwrap() on an Err value: ()', C:\Users\JEREMY.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\5cd2bf9\build.rs:146:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace."

A quick look at the source for magnum-opus reveals that it wants the actual libopus sources available so it can generate the bindings [1]. You'll need to install the headers somewhere the magnum-opus build script can locate them. It looks like it will try to use vcpkg and homebrew [2] on Windows, so you probably want to install them via vcpkg. I don't use that, so I can't help you with that.


  1. Crap like this is why I hate using crates that use bindgen. They never, ever build easily or cleanly. ↩︎

  2. I thought homebrew was a Mac thing... :confused: ↩︎

1 Like