Don't propagate non-shared transitive linker inputs from `rust_static|shared_library` (#1299)

A Rust `staticlib` or `cdylib` doesn't need to propagate linker inputs of its dependencies, except for shared libraries.

- The tests are currently disabled on osx because the CI [Toolchain does not support dynamic linking]( https://buildkite.com/bazel/rules-rust-rustlang/builds/6126#a83dbb56-50b0-4a95-bb39-09e3a78ed0d0).
- I also had to link to `Bcrypt.lib` => https://github.com/rust-lang/rust/issues/91974
12 files changed
tree: 07b5f1cbf235d15cfbba795d73d5529723acbb8d
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. distro/
  7. docs/
  8. examples/
  9. proto/
  10. rust/
  11. test/
  12. tools/
  13. util/
  14. wasm_bindgen/
  15. .bazelignore
  16. .bazelrc
  17. .gitignore
  18. ARCHITECTURE.md
  19. AUTHORS
  20. BUILD.bazel
  21. CODEOWNERS
  22. COMPATIBILITY.md
  23. CONTRIBUTING.md
  24. CONTRIBUTORS
  25. LICENSE.txt
  26. README.md
  27. version.bzl
  28. WORKSPACE.bazel
  29. 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.