propagate buildscript link search paths to parent crate (#1123)

Adds a new `link_search_paths: File` field to `BuildInfo` provider.

Resolves #859

I use native Windows bindings through [windows-rs](https://github.com/microsoft/windows-rs) crate and it fails to link without propagating the link search path to a platform-dependent native library. The bindings call for a native library via `#[link(name = "windows")]` and propagate search path by a buildscript from a dependency (i.e. a transitive dependency for a root crate).

Propagating link search paths seems to be what is cargo doing.
7 files changed
tree: 186927e03435acc62de35f6960be76644e2244fa
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. proto/
  9. rust/
  10. test/
  11. tools/
  12. util/
  13. wasm_bindgen/
  14. .bazelignore
  15. .bazelrc
  16. .gitignore
  17. ARCHITECTURE.md
  18. AUTHORS
  19. BUILD.bazel
  20. CODEOWNERS
  21. COMPATIBILITY.md
  22. CONTRIBUTING.md
  23. CONTRIBUTORS
  24. LICENSE.txt
  25. README.md
  26. WORKSPACE.bazel
  27. workspace.bzl
README.md

Rust Rules

  • Postsubmit Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Community

General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.

Documentation

Please refer to the full documentation.