Fix Windows GNU staticlib output naming (#4231) ## Summary Make Rust static-library naming ABI-aware on Windows. Rust emits `lib<crate>.a` for the GNU and GNULLVM Windows ABIs, while MSVC emits `<crate>.lib`. The generated Rust toolchain currently selects `.lib` from the operating system alone, and `determine_lib_name` removes the `lib` prefix for every Windows static library. As a result, Bazel declares an output different from the file emitted by rustc for Windows GNU-like targets. This change passes the target ABI through repository and toolchain generation, selects `.a` for Windows GNU/GNULLVM static libraries, and preserves their `lib` prefix. MSVC behavior and Windows dynamic-library naming remain unchanged. Regression coverage exercises the extension mapping, rendered toolchain metadata, final GNU/GNULLVM/MSVC static-library names, and the unchanged GNU `cdylib` name.
This repository provides rules for building Rust projects with Bazel.
The fastest way to try this in an empty project is to click the green “Use this template” button on https://github.com/bazel-starters/rust.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.
Please refer to the full documentation.