for a workspace:
workspace - - Cargo.toml - crate_a - Cargo.toml - build.rs - crate_b
@matklad is there any method for
crate_a/build.rs to get the
workspace's root path with env variable?
CARGO_MANIFEST_DIR can only return the path of
IIRC, that's not possible in a good. I remember facing the same issue with
insta. The workaround is to call
cargo metadata from
@matklad thanks :slight_smile:
is it suitable to post a feature request to cargo repo?
Yeah, I think
CARGO_WORKSPACE_MANIFEST_DIR is a reasonable thing to add to Cargo. The insta issue was https://github.com/mitsuhiko/insta/issues/1