bazelbuild / rules_rust

Rust rules for Bazel
https://bazelbuild.github.io/rules_rust/
Apache License 2.0
650 stars 409 forks source link

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

Open goffrie opened 1 year ago

goffrie commented 1 year ago

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.

UebelAndre commented 1 year ago

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