These are chat archives for rust-lang/rust
-rpath $ORIGIN, and GCC allows to pass it down via
-Wl. But Rust seems to only have
#[link_args], which are nightly.
-C link-args, -C rpathcompiler args for this purpose. Though it's still unknown how to pass them via Cargo.
cargo rustc, but that's another set of square wheels, sadly
-C link-args="-Wl,-rpath,\$ORIGIN", which is a common way to enable SO search alongside binary