Migration of Batch 3 of tests to rules_testing (#4445) Migrates the next batch of 5 Starlark test suites from `@bazel_skylib//lib:unittest.bzl` (`analysistest`) to `@rules_testing`: - **`//test/unit/aliases:aliases_test.bzl`**: Replaces `analysistest.make` and `_assert_extern` with `analysis_test`, `test_suite`, `util.helper_target`, and `env.expect.that_action(...).argv().contains_predicate(matching.str_startswith(...))`. - **`//test/unit/check_runfiles:check_runfiles_test.bzl`**: Splits the `lib`, `bin`, `dylib`, and `static` runfile checks into per-test `analysis_test` functions under `test_suite` using `env.expect.that_collection(...)`, while keeping the shared `libbar.so` and `cc_lib` target names so the mangled solib exclusion check remains intact. - **`//test/unit/windows_stdlib:windows_stdlib_test.bzl`**: Converts both pure Starlark toolchain flag tests from `analysistest.make` (with a dummy `filegroup`) to `unit_test` + `test_suite`, using `that_collection(...).contains_exactly(...).in_order()` and `that_str(...).contains(...)`. - **`//test/unit/link_deps:link_deps_test.bzl`** (+ `BUILD.bazel`): Replaces `analysistest.make` with an `analysis_test` macro (`target = ":main_lib"`) asserting via `has_provider(CcInfo)` and `that_collection(...)`. - **`//test/rustdoc_runfiles:runfiles_test.bzl`** (+ `BUILD.bazel`): Replaces `analysistest.make` with an `analysis_test` macro (`target = ":runtime_data_test"`), relying on transitive target incompatibility propagation from `:runtime_data_test` rather than duplicating `target_compatible_with` on the test target. Signed-off-by: Taylor Edwards <tayloredwards@google.com>
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.