Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: follow cargo best practice in build.rs script (#90)
Using env! inside the build.rs script makes it difficult to build this package with other build tools like bazel which sandbox execution, since the source directory might be at different paths between when the build.rs file is compiled, and when the resulting build script is executed. Cargo recommends that CARGO_MANIFEST_DIR is read at runtime instead: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts The above links also includes the promise that Cargo will set the cwd to the crate's directory. This patch uses this to find the descriptors.bin file. Co-authored-by: Raphael Taylor-Davies <[email protected]>
- Loading branch information