Include transitive out_dirs in linking action (#3579) If a build script compiles a file which is needed at linking time, and adds a linker flag to add it to the search path, we need the out_dir to be present in the link action in order for the search path flag to actually take effect. This was the original behaviour way back in 3a569b8590aed8a2166aec269aaf83c195bdd373 but got removed in 9426a3820093e75ea07d14f875e42f789632507f which was intending to only restrict where flags were propagated but also stopped propagating out_dir files. This is required because cargo uses the path to the out_dir as a well-known-path that doesn't move between builds, so link flags from a build script which get transitively propagated up to a link action happen to point at the right location on disk. We need to propagate this out_dir because the known location on disk is probably in a sandbox, so we need to explicitly materialise the files into the sandbox.
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.
Please refer to the full documentation.