• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Alias-like rule for testing."""
2
3load("@rules_rust//rust:defs.bzl", "rust_common")
4
5def _custom_alias_impl(ctx):
6    actual = ctx.attr.actual
7    return [actual[rust_common.crate_info], actual[rust_common.dep_info]]
8
9custom_alias = rule(
10    implementation = _custom_alias_impl,
11    attrs = {
12        "actual": attr.label(
13            allow_single_file = True,
14            mandatory = True,
15        ),
16    },
17)
18