rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

rust_binary/rust_test don't copy cc_import runtime libraries for Windows

Open goffrie opened this issue 3 years ago • 1 comments

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. It would be nice if the Rust rules could do something similar.

goffrie avatar Sep 15 '22 01:09 goffrie

If there's prior art for this in upstream Bazel then I'd be happy to review a PR 😄

UebelAndre avatar Sep 15 '22 17:09 UebelAndre