bazelbuild / bazelbuild/rules_rust
rust_binary/rust_test don't copy cc_import runtime libraries for Windows
Open
bug
expert-needed
needs-triage
windows
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
If you depend on a cc_import library from a rust_binary target, on Windows the binary will fail to launch because the library DLL is not found. (On other platforms it seems that the library is found via RPATH, but Windows doesn't have that.)
cc_binary solves this problem by [symlinking such libraries into the output directory of the executable](https://github.com/bazelbuild/bazel/blob/dcc5b227fa008464f43790c2a783dc008345bec7/src/main/starlark/builtins_bzl/common/cc/cc_binary.bzl#L290). It would be nice if the Rust rules could do something similar.
Contributor guide
Assessment
This issue has not been assessed yet.