Runfiles lookup library for Bazel-built Rust binaries and tests.
USAGE:
- Depend on this runfiles library from your build rule:
- Import the runfiles library.
use runfiles::Runfiles;
- Create a Runfiles object and use `rlocation!`` to look up runfile paths:
use runfiles::{Runfiles, rlocation};
let r = Runfiles::create().unwrap();
let path = rlocation!(r, "my_workspace/path/to/my/data.txt").expect("Failed to locate runfile");
let f = File::open(path).unwrap();
// ...