Expand description
Build-script helpers for downstream crates that link rust-usd.
rust-usd’s own build.rs emits the rpath args its examples need at
runtime, but cargo:rustc-link-arg only applies to the immediate target.
Downstream binaries / examples have to re-emit the same rpaths or the
dynamic loader can’t find libpxr_*.dylib at startup.
Add this crate as a build-dependency and call emit_runtime_rpath from
your own build.rs:
ⓘ
fn main() {
rust_usd_build::emit_runtime_rpath();
}It reads the same environment variables rust-usd’s build script does
and is a no-op if none of them are set, so consumers can leave the call
in unconditionally even on CI machines without a USD install.
Functions§
- emit_
runtime_ rpath - Emit the
cargo:rustc-link-argdirectives needed for downstream executables to find OpenUSD’s dylibs at runtime via@rpath.