fork/rules_rust

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

UebelAndreShorten wasm_bindgen dependency repo prefix (#3036)d9e6084a

main
1.6 KiB63 linesraw
1load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_vendor")
3load("//:repositories.bzl", "WASM_BINDGEN_VERSION")
4
5exports_files([
6    "BUILD.wasm-bindgen-cli.bazel",
7])
8
9crates_vendor(
10    name = "crates_vendor",
11    annotations = {
12        "log": [crate.annotation(
13            rustc_flags = [
14                "--cfg=atomic_cas",
15                "--cfg=use_std",
16            ],
17            version = "<5",
18        )],
19        "proc-macro2": [crate.annotation(
20            rustc_flags = ["--cfg=use_proc_macro"],
21        )],
22        "unicase": [crate.annotation(
23            rustc_flags = [
24                "--cfg=__unicase__iter_cmp",
25                "--cfg=__unicase__defauler_hasher",
26            ],
27        )],
28    },
29    cargo_lockfile = "Cargo.Bazel.lock",
30    manifests = ["@rules_rust_wasm_bindgen_cli//:Cargo.toml"],
31    mode = "remote",
32    packages = {
33        "wasm-bindgen": crate.spec(
34            version = WASM_BINDGEN_VERSION,
35        ),
36    },
37    # Shorten the repository name to avoid MAX_PATH issues on Windows
38    # `rules_rust_wasm_bindgen_deps` == `rrwbd`
39    repository_name = "rrwbd",
40    tags = ["manual"],
41)
42
43alias(
44    name = "wasm_bindgen_cli",
45    actual = "@rules_rust_wasm_bindgen_cli",
46    tags = ["manual"],
47    visibility = ["//visibility:public"],
48)
49
50alias(
51    name = "wasm_bindgen",
52    actual = "//3rdparty/crates:wasm-bindgen",
53    visibility = ["//visibility:public"],
54)
55
56bzl_library(
57    name = "bzl_lib",
58    srcs = [
59        "//3rdparty/crates:crates.bzl",
60        "//3rdparty/crates:defs.bzl",
61    ],
62    visibility = ["//:__pkg__"],
63)