fork/rules_rust

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

UebelAndreUpdate wasm_bindgen to use crate universe. (#1398)97264b79

0.6.0
2.4 KiB93 linesraw
1load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2load("//crate_universe:defs.bzl", "crate", "crates_vendor")
3load("//wasm_bindgen: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        "curl-sys": [crate.annotation(
13            gen_build_script = False,
14        )],
15        "log": [crate.annotation(
16            rustc_flags = [
17                "--cfg=atomic_cas",
18                "--cfg=use_std",
19            ],
20            version = "<5",
21        )],
22        "openssl-sys": [crate.annotation(
23            gen_build_script = False,
24            rustc_flags = [
25                # Vendored openssl is 1.0.2m
26                "--cfg=ossl101",
27                "--cfg=ossl102",
28                "--cfg=ossl102f",
29                "--cfg=ossl102h",
30                "--cfg=ossl110",
31                "--cfg=ossl110f",
32                "--cfg=ossl110g",
33                "--cfg=ossl111",
34                "--cfg=ossl111b",
35                "-l",
36                "dylib=ssl",
37                "-l",
38                "dylib=crypto",
39            ],
40        )],
41        "proc-macro2": [crate.annotation(
42            rustc_flags = ["--cfg=use_proc_macro"],
43        )],
44        "unicase": [crate.annotation(
45            rustc_flags = [
46                "--cfg=__unicase__iter_cmp",
47                "--cfg=__unicase__defauler_hasher",
48            ],
49        )],
50    },
51    manifests = ["@rules_rust_wasm_bindgen_cli//:Cargo.toml"],
52    mode = "remote",
53    packages = {
54        "wasm-bindgen": crate.spec(
55            version = WASM_BINDGEN_VERSION,
56        ),
57    },
58    repository_name = "rules_rust_wasm_bindgen",
59    tags = ["manual"],
60)
61
62alias(
63    name = "wasm_bindgen_cli",
64    actual = "@rules_rust_wasm_bindgen_cli",
65    tags = ["manual"],
66    visibility = ["//visibility:public"],
67)
68
69alias(
70    name = "wasm_bindgen",
71    actual = "//wasm_bindgen/3rdparty/crates:wasm-bindgen",
72    visibility = ["//visibility:public"],
73)
74
75bzl_library(
76    name = "bzl_lib",
77    srcs = glob(["**/*.bzl"]) + [
78        "//wasm_bindgen/3rdparty/crates:defs.bzl",
79        "//wasm_bindgen/3rdparty/crates:crates.bzl",
80    ],
81    visibility = ["//wasm_bindgen:__pkg__"],
82)
83
84filegroup(
85    name = "distro",
86    srcs = glob([
87        "*.bzl",
88        "*.bazel",
89    ]) + [
90        "//wasm_bindgen/3rdparty/crates:srcs",
91    ],
92    visibility = ["//wasm_bindgen:__pkg__"],
93)