fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

UebelAndreMoved rust extension rules into a separate `rules_rust_ext` workspace. (#3007)2bad96d9

cleanup
866 B30 linesraw
1"""Test utiltiies for ensuring bzlmod and workspace versions match"""
2
3load("//:version.bzl", "VERSION")
4load("//rust:defs.bzl", "rust_test")
5
6def bzl_version_test(name, module_bazel, **kwargs):
7    """A test for ensuring a bzlmod repo is in sync with the core rules_rust version.
8
9    Args:
10        name (str): The name of the test
11        module_bazel (label): The label of a `MODULE.bazel` file.
12        **kwargs (dict): Additional keyword arguments.
13    """
14
15    rust_test(
16        name = name,
17        srcs = [Label("//test/bzl_version:bzl_version_test.rs")],
18        data = [
19            module_bazel,
20        ],
21        edition = "2021",
22        env = {
23            "MODULE_BAZEL": "$(rlocationpath {})".format(module_bazel),
24            "VERSION": VERSION,
25        },
26        deps = [
27            Label("//tools/runfiles"),
28        ],
29        **kwargs
30    )