'How to share the binaries of a rust project that uses gstreamer-rs

I am learning rust by building a cli. The project uses gstreamer-rs. So far it works well on my machine but I still can't figure out how to distribute the binary.

The project and the test realease

Running cargo build --release builds a target that is around 500 MB large. I thought that I could ask my friend to install the required dependecies by apt-installing the libraries that would appear in the error while he tried to run the binary from the release. But from the error message, it seems like the binary stores the path to libraries on my machine (/home/nsrcodes/ is my home directory)

thread 'main' panicked at 'Unable to make desktop-audio-encoder: BoolError { message: "Failed to create element from factory name", filename: "/home/nsrcodes/.cargo/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.17.4/src/auto/element_factory.rs", function: "gstreamer::auto::element_factory", line: 204 }', src/recorder.rs:79:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

what is the right way to distribute this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source