• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1###############################################################################
2# @generated
3# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
4# regenerate this file, run the following:
5#
6#     bazel run @//vendor_external:crates_vendor
7###############################################################################
8"""
9# `crates_repository` API
10
11- [aliases](#aliases)
12- [crate_deps](#crate_deps)
13- [all_crate_deps](#all_crate_deps)
14- [crate_repositories](#crate_repositories)
15
16"""
17
18load("@bazel_skylib//lib:selects.bzl", "selects")
19load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
20load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
21
22###############################################################################
23# MACROS API
24###############################################################################
25
26# An identifier that represent common dependencies (unconditional).
27_COMMON_CONDITION = ""
28
29def _flatten_dependency_maps(all_dependency_maps):
30    """Flatten a list of dependency maps into one dictionary.
31
32    Dependency maps have the following structure:
33
34    ```python
35    DEPENDENCIES_MAP = {
36        # The first key in the map is a Bazel package
37        # name of the workspace this file is defined in.
38        "workspace_member_package": {
39
40            # Not all dependencies are supported for all platforms.
41            # the condition key is the condition required to be true
42            # on the host platform.
43            "condition": {
44
45                # An alias to a crate target.     # The label of the crate target the
46                # Aliases are only crate names.   # package name refers to.
47                "package_name":                   "@full//:label",
48            }
49        }
50    }
51    ```
52
53    Args:
54        all_dependency_maps (list): A list of dicts as described above
55
56    Returns:
57        dict: A dictionary as described above
58    """
59    dependencies = {}
60
61    for workspace_deps_map in all_dependency_maps:
62        for pkg_name, conditional_deps_map in workspace_deps_map.items():
63            if pkg_name not in dependencies:
64                non_frozen_map = dict()
65                for key, values in conditional_deps_map.items():
66                    non_frozen_map.update({key: dict(values.items())})
67                dependencies.setdefault(pkg_name, non_frozen_map)
68                continue
69
70            for condition, deps_map in conditional_deps_map.items():
71                # If the condition has not been recorded, do so and continue
72                if condition not in dependencies[pkg_name]:
73                    dependencies[pkg_name].setdefault(condition, dict(deps_map.items()))
74                    continue
75
76                # Alert on any miss-matched dependencies
77                inconsistent_entries = []
78                for crate_name, crate_label in deps_map.items():
79                    existing = dependencies[pkg_name][condition].get(crate_name)
80                    if existing and existing != crate_label:
81                        inconsistent_entries.append((crate_name, existing, crate_label))
82                    dependencies[pkg_name][condition].update({crate_name: crate_label})
83
84    return dependencies
85
86def crate_deps(deps, package_name = None):
87    """Finds the fully qualified label of the requested crates for the package where this macro is called.
88
89    Args:
90        deps (list): The desired list of crate targets.
91        package_name (str, optional): The package name of the set of dependencies to look up.
92            Defaults to `native.package_name()`.
93
94    Returns:
95        list: A list of labels to generated rust targets (str)
96    """
97
98    if not deps:
99        return []
100
101    if package_name == None:
102        package_name = native.package_name()
103
104    # Join both sets of dependencies
105    dependencies = _flatten_dependency_maps([
106        _NORMAL_DEPENDENCIES,
107        _NORMAL_DEV_DEPENDENCIES,
108        _PROC_MACRO_DEPENDENCIES,
109        _PROC_MACRO_DEV_DEPENDENCIES,
110        _BUILD_DEPENDENCIES,
111        _BUILD_PROC_MACRO_DEPENDENCIES,
112    ]).pop(package_name, {})
113
114    # Combine all conditional packages so we can easily index over a flat list
115    # TODO: Perhaps this should actually return select statements and maintain
116    # the conditionals of the dependencies
117    flat_deps = {}
118    for deps_set in dependencies.values():
119        for crate_name, crate_label in deps_set.items():
120            flat_deps.update({crate_name: crate_label})
121
122    missing_crates = []
123    crate_targets = []
124    for crate_target in deps:
125        if crate_target not in flat_deps:
126            missing_crates.append(crate_target)
127        else:
128            crate_targets.append(flat_deps[crate_target])
129
130    if missing_crates:
131        fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format(
132            missing_crates,
133            package_name,
134            dependencies,
135        ))
136
137    return crate_targets
138
139def all_crate_deps(
140        normal = False,
141        normal_dev = False,
142        proc_macro = False,
143        proc_macro_dev = False,
144        build = False,
145        build_proc_macro = False,
146        package_name = None):
147    """Finds the fully qualified label of all requested direct crate dependencies \
148    for the package where this macro is called.
149
150    If no parameters are set, all normal dependencies are returned. Setting any one flag will
151    otherwise impact the contents of the returned list.
152
153    Args:
154        normal (bool, optional): If True, normal dependencies are included in the
155            output list.
156        normal_dev (bool, optional): If True, normal dev dependencies will be
157            included in the output list..
158        proc_macro (bool, optional): If True, proc_macro dependencies are included
159            in the output list.
160        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are
161            included in the output list.
162        build (bool, optional): If True, build dependencies are included
163            in the output list.
164        build_proc_macro (bool, optional): If True, build proc_macro dependencies are
165            included in the output list.
166        package_name (str, optional): The package name of the set of dependencies to look up.
167            Defaults to `native.package_name()` when unset.
168
169    Returns:
170        list: A list of labels to generated rust targets (str)
171    """
172
173    if package_name == None:
174        package_name = native.package_name()
175
176    # Determine the relevant maps to use
177    all_dependency_maps = []
178    if normal:
179        all_dependency_maps.append(_NORMAL_DEPENDENCIES)
180    if normal_dev:
181        all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES)
182    if proc_macro:
183        all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES)
184    if proc_macro_dev:
185        all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES)
186    if build:
187        all_dependency_maps.append(_BUILD_DEPENDENCIES)
188    if build_proc_macro:
189        all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES)
190
191    # Default to always using normal dependencies
192    if not all_dependency_maps:
193        all_dependency_maps.append(_NORMAL_DEPENDENCIES)
194
195    dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None)
196
197    if not dependencies:
198        if dependencies == None:
199            fail("Tried to get all_crate_deps for package " + package_name + " but that package had no Cargo.toml file")
200        else:
201            return []
202
203    crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values())
204    for condition, deps in dependencies.items():
205        crate_deps += selects.with_or({
206            tuple(_CONDITIONS[condition]): deps.values(),
207            "//conditions:default": [],
208        })
209
210    return crate_deps
211
212def aliases(
213        normal = False,
214        normal_dev = False,
215        proc_macro = False,
216        proc_macro_dev = False,
217        build = False,
218        build_proc_macro = False,
219        package_name = None):
220    """Produces a map of Crate alias names to their original label
221
222    If no dependency kinds are specified, `normal` and `proc_macro` are used by default.
223    Setting any one flag will otherwise determine the contents of the returned dict.
224
225    Args:
226        normal (bool, optional): If True, normal dependencies are included in the
227            output list.
228        normal_dev (bool, optional): If True, normal dev dependencies will be
229            included in the output list..
230        proc_macro (bool, optional): If True, proc_macro dependencies are included
231            in the output list.
232        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are
233            included in the output list.
234        build (bool, optional): If True, build dependencies are included
235            in the output list.
236        build_proc_macro (bool, optional): If True, build proc_macro dependencies are
237            included in the output list.
238        package_name (str, optional): The package name of the set of dependencies to look up.
239            Defaults to `native.package_name()` when unset.
240
241    Returns:
242        dict: The aliases of all associated packages
243    """
244    if package_name == None:
245        package_name = native.package_name()
246
247    # Determine the relevant maps to use
248    all_aliases_maps = []
249    if normal:
250        all_aliases_maps.append(_NORMAL_ALIASES)
251    if normal_dev:
252        all_aliases_maps.append(_NORMAL_DEV_ALIASES)
253    if proc_macro:
254        all_aliases_maps.append(_PROC_MACRO_ALIASES)
255    if proc_macro_dev:
256        all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES)
257    if build:
258        all_aliases_maps.append(_BUILD_ALIASES)
259    if build_proc_macro:
260        all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES)
261
262    # Default to always using normal aliases
263    if not all_aliases_maps:
264        all_aliases_maps.append(_NORMAL_ALIASES)
265        all_aliases_maps.append(_PROC_MACRO_ALIASES)
266
267    aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None)
268
269    if not aliases:
270        return dict()
271
272    common_items = aliases.pop(_COMMON_CONDITION, {}).items()
273
274    # If there are only common items in the dictionary, immediately return them
275    if not len(aliases.keys()) == 1:
276        return dict(common_items)
277
278    # Build a single select statement where each conditional has accounted for the
279    # common set of aliases.
280    crate_aliases = {"//conditions:default": dict(common_items)}
281    for condition, deps in aliases.items():
282        condition_triples = _CONDITIONS[condition]
283        for triple in condition_triples:
284            if triple in crate_aliases:
285                crate_aliases[triple].update(deps)
286            else:
287                crate_aliases.update({triple: dict(deps.items() + common_items)})
288
289    return select(crate_aliases)
290
291###############################################################################
292# WORKSPACE MEMBER DEPS AND ALIASES
293###############################################################################
294
295_NORMAL_DEPENDENCIES = {
296    "": {
297        _COMMON_CONDITION: {
298            "clap": Label("@crates_vendor__clap-3.1.5//:clap"),
299            "rand": Label("@crates_vendor__rand-0.8.5//:rand"),
300        },
301    },
302}
303
304_NORMAL_ALIASES = {
305    "": {
306        _COMMON_CONDITION: {
307        },
308    },
309}
310
311_NORMAL_DEV_DEPENDENCIES = {
312    "": {
313        _COMMON_CONDITION: {
314            "version-sync": Label("@crates_vendor__version-sync-0.9.4//:version_sync"),
315        },
316    },
317}
318
319_NORMAL_DEV_ALIASES = {
320    "": {
321        _COMMON_CONDITION: {
322        },
323    },
324}
325
326_PROC_MACRO_DEPENDENCIES = {
327    "": {
328    },
329}
330
331_PROC_MACRO_ALIASES = {
332    "": {
333    },
334}
335
336_PROC_MACRO_DEV_DEPENDENCIES = {
337    "": {
338    },
339}
340
341_PROC_MACRO_DEV_ALIASES = {
342    "": {
343        _COMMON_CONDITION: {
344        },
345    },
346}
347
348_BUILD_DEPENDENCIES = {
349    "": {
350    },
351}
352
353_BUILD_ALIASES = {
354    "": {
355    },
356}
357
358_BUILD_PROC_MACRO_DEPENDENCIES = {
359    "": {
360    },
361}
362
363_BUILD_PROC_MACRO_ALIASES = {
364    "": {
365    },
366}
367
368_CONDITIONS = {
369    "aarch64-apple-darwin": ["@rules_rust//rust/platform:aarch64-apple-darwin"],
370    "aarch64-apple-ios": ["@rules_rust//rust/platform:aarch64-apple-ios"],
371    "aarch64-apple-ios-sim": ["@rules_rust//rust/platform:aarch64-apple-ios-sim"],
372    "aarch64-fuchsia": ["@rules_rust//rust/platform:aarch64-fuchsia"],
373    "aarch64-linux-android": ["@rules_rust//rust/platform:aarch64-linux-android"],
374    "aarch64-pc-windows-msvc": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"],
375    "aarch64-unknown-linux-gnu": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu"],
376    "aarch64-unknown-nixos-gnu": ["@rules_rust//rust/platform:aarch64-unknown-nixos-gnu"],
377    "aarch64-unknown-nto-qnx710": ["@rules_rust//rust/platform:aarch64-unknown-nto-qnx710"],
378    "arm-unknown-linux-gnueabi": ["@rules_rust//rust/platform:arm-unknown-linux-gnueabi"],
379    "armv7-linux-androideabi": ["@rules_rust//rust/platform:armv7-linux-androideabi"],
380    "armv7-unknown-linux-gnueabi": ["@rules_rust//rust/platform:armv7-unknown-linux-gnueabi"],
381    "cfg(target_os = \"hermit\")": [],
382    "cfg(target_os = \"wasi\")": ["@rules_rust//rust/platform:wasm32-wasi"],
383    "cfg(unix)": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu", "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
384    "cfg(windows)": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:i686-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-pc-windows-msvc"],
385    "i686-apple-darwin": ["@rules_rust//rust/platform:i686-apple-darwin"],
386    "i686-linux-android": ["@rules_rust//rust/platform:i686-linux-android"],
387    "i686-pc-windows-gnu": [],
388    "i686-pc-windows-msvc": ["@rules_rust//rust/platform:i686-pc-windows-msvc"],
389    "i686-unknown-freebsd": ["@rules_rust//rust/platform:i686-unknown-freebsd"],
390    "i686-unknown-linux-gnu": ["@rules_rust//rust/platform:i686-unknown-linux-gnu"],
391    "powerpc-unknown-linux-gnu": ["@rules_rust//rust/platform:powerpc-unknown-linux-gnu"],
392    "riscv32imc-unknown-none-elf": ["@rules_rust//rust/platform:riscv32imc-unknown-none-elf"],
393    "riscv64gc-unknown-none-elf": ["@rules_rust//rust/platform:riscv64gc-unknown-none-elf"],
394    "s390x-unknown-linux-gnu": ["@rules_rust//rust/platform:s390x-unknown-linux-gnu"],
395    "thumbv7em-none-eabi": ["@rules_rust//rust/platform:thumbv7em-none-eabi"],
396    "thumbv8m.main-none-eabi": ["@rules_rust//rust/platform:thumbv8m.main-none-eabi"],
397    "wasm32-unknown-unknown": ["@rules_rust//rust/platform:wasm32-unknown-unknown"],
398    "wasm32-wasi": ["@rules_rust//rust/platform:wasm32-wasi"],
399    "x86_64-apple-darwin": ["@rules_rust//rust/platform:x86_64-apple-darwin"],
400    "x86_64-apple-ios": ["@rules_rust//rust/platform:x86_64-apple-ios"],
401    "x86_64-fuchsia": ["@rules_rust//rust/platform:x86_64-fuchsia"],
402    "x86_64-linux-android": ["@rules_rust//rust/platform:x86_64-linux-android"],
403    "x86_64-pc-windows-gnu": [],
404    "x86_64-pc-windows-msvc": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"],
405    "x86_64-unknown-freebsd": ["@rules_rust//rust/platform:x86_64-unknown-freebsd"],
406    "x86_64-unknown-linux-gnu": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
407    "x86_64-unknown-nixos-gnu": ["@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
408    "x86_64-unknown-none": ["@rules_rust//rust/platform:x86_64-unknown-none"],
409}
410
411###############################################################################
412
413def crate_repositories():
414    """A macro for defining repositories for all generated crates.
415
416    Returns:
417      A list of repos visible to the module through the module extension.
418    """
419    maybe(
420        http_archive,
421        name = "crates_vendor__atty-0.2.14",
422        sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8",
423        type = "tar.gz",
424        urls = ["https://static.crates.io/crates/atty/0.2.14/download"],
425        strip_prefix = "atty-0.2.14",
426        build_file = Label("@examples//vendor_external/crates:BUILD.atty-0.2.14.bazel"),
427    )
428
429    maybe(
430        http_archive,
431        name = "crates_vendor__autocfg-1.1.0",
432        sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa",
433        type = "tar.gz",
434        urls = ["https://static.crates.io/crates/autocfg/1.1.0/download"],
435        strip_prefix = "autocfg-1.1.0",
436        build_file = Label("@examples//vendor_external/crates:BUILD.autocfg-1.1.0.bazel"),
437    )
438
439    maybe(
440        http_archive,
441        name = "crates_vendor__bitflags-1.3.2",
442        sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a",
443        type = "tar.gz",
444        urls = ["https://static.crates.io/crates/bitflags/1.3.2/download"],
445        strip_prefix = "bitflags-1.3.2",
446        build_file = Label("@examples//vendor_external/crates:BUILD.bitflags-1.3.2.bazel"),
447    )
448
449    maybe(
450        http_archive,
451        name = "crates_vendor__cfg-if-1.0.0",
452        sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd",
453        type = "tar.gz",
454        urls = ["https://static.crates.io/crates/cfg-if/1.0.0/download"],
455        strip_prefix = "cfg-if-1.0.0",
456        build_file = Label("@examples//vendor_external/crates:BUILD.cfg-if-1.0.0.bazel"),
457    )
458
459    maybe(
460        http_archive,
461        name = "crates_vendor__clap-3.1.5",
462        sha256 = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312",
463        type = "tar.gz",
464        urls = ["https://static.crates.io/crates/clap/3.1.5/download"],
465        strip_prefix = "clap-3.1.5",
466        build_file = Label("@examples//vendor_external/crates:BUILD.clap-3.1.5.bazel"),
467    )
468
469    maybe(
470        http_archive,
471        name = "crates_vendor__clap_derive-3.1.4",
472        sha256 = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16",
473        type = "tar.gz",
474        urls = ["https://static.crates.io/crates/clap_derive/3.1.4/download"],
475        strip_prefix = "clap_derive-3.1.4",
476        build_file = Label("@examples//vendor_external/crates:BUILD.clap_derive-3.1.4.bazel"),
477    )
478
479    maybe(
480        http_archive,
481        name = "crates_vendor__form_urlencoded-1.0.1",
482        sha256 = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191",
483        type = "tar.gz",
484        urls = ["https://static.crates.io/crates/form_urlencoded/1.0.1/download"],
485        strip_prefix = "form_urlencoded-1.0.1",
486        build_file = Label("@examples//vendor_external/crates:BUILD.form_urlencoded-1.0.1.bazel"),
487    )
488
489    maybe(
490        http_archive,
491        name = "crates_vendor__getrandom-0.2.5",
492        sha256 = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77",
493        type = "tar.gz",
494        urls = ["https://static.crates.io/crates/getrandom/0.2.5/download"],
495        strip_prefix = "getrandom-0.2.5",
496        build_file = Label("@examples//vendor_external/crates:BUILD.getrandom-0.2.5.bazel"),
497    )
498
499    maybe(
500        http_archive,
501        name = "crates_vendor__hashbrown-0.11.2",
502        sha256 = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e",
503        type = "tar.gz",
504        urls = ["https://static.crates.io/crates/hashbrown/0.11.2/download"],
505        strip_prefix = "hashbrown-0.11.2",
506        build_file = Label("@examples//vendor_external/crates:BUILD.hashbrown-0.11.2.bazel"),
507    )
508
509    maybe(
510        http_archive,
511        name = "crates_vendor__heck-0.4.0",
512        sha256 = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9",
513        type = "tar.gz",
514        urls = ["https://static.crates.io/crates/heck/0.4.0/download"],
515        strip_prefix = "heck-0.4.0",
516        build_file = Label("@examples//vendor_external/crates:BUILD.heck-0.4.0.bazel"),
517    )
518
519    maybe(
520        http_archive,
521        name = "crates_vendor__hermit-abi-0.1.19",
522        sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33",
523        type = "tar.gz",
524        urls = ["https://static.crates.io/crates/hermit-abi/0.1.19/download"],
525        strip_prefix = "hermit-abi-0.1.19",
526        build_file = Label("@examples//vendor_external/crates:BUILD.hermit-abi-0.1.19.bazel"),
527    )
528
529    maybe(
530        http_archive,
531        name = "crates_vendor__idna-0.2.3",
532        sha256 = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8",
533        type = "tar.gz",
534        urls = ["https://static.crates.io/crates/idna/0.2.3/download"],
535        strip_prefix = "idna-0.2.3",
536        build_file = Label("@examples//vendor_external/crates:BUILD.idna-0.2.3.bazel"),
537    )
538
539    maybe(
540        http_archive,
541        name = "crates_vendor__indexmap-1.8.0",
542        sha256 = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223",
543        type = "tar.gz",
544        urls = ["https://static.crates.io/crates/indexmap/1.8.0/download"],
545        strip_prefix = "indexmap-1.8.0",
546        build_file = Label("@examples//vendor_external/crates:BUILD.indexmap-1.8.0.bazel"),
547    )
548
549    maybe(
550        http_archive,
551        name = "crates_vendor__lazy_static-1.4.0",
552        sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646",
553        type = "tar.gz",
554        urls = ["https://static.crates.io/crates/lazy_static/1.4.0/download"],
555        strip_prefix = "lazy_static-1.4.0",
556        build_file = Label("@examples//vendor_external/crates:BUILD.lazy_static-1.4.0.bazel"),
557    )
558
559    maybe(
560        http_archive,
561        name = "crates_vendor__libc-0.2.119",
562        sha256 = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4",
563        type = "tar.gz",
564        urls = ["https://static.crates.io/crates/libc/0.2.119/download"],
565        strip_prefix = "libc-0.2.119",
566        build_file = Label("@examples//vendor_external/crates:BUILD.libc-0.2.119.bazel"),
567    )
568
569    maybe(
570        http_archive,
571        name = "crates_vendor__matches-0.1.9",
572        sha256 = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f",
573        type = "tar.gz",
574        urls = ["https://static.crates.io/crates/matches/0.1.9/download"],
575        strip_prefix = "matches-0.1.9",
576        build_file = Label("@examples//vendor_external/crates:BUILD.matches-0.1.9.bazel"),
577    )
578
579    maybe(
580        http_archive,
581        name = "crates_vendor__memchr-2.4.1",
582        sha256 = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a",
583        type = "tar.gz",
584        urls = ["https://static.crates.io/crates/memchr/2.4.1/download"],
585        strip_prefix = "memchr-2.4.1",
586        build_file = Label("@examples//vendor_external/crates:BUILD.memchr-2.4.1.bazel"),
587    )
588
589    maybe(
590        http_archive,
591        name = "crates_vendor__os_str_bytes-6.0.0",
592        sha256 = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64",
593        type = "tar.gz",
594        urls = ["https://static.crates.io/crates/os_str_bytes/6.0.0/download"],
595        strip_prefix = "os_str_bytes-6.0.0",
596        build_file = Label("@examples//vendor_external/crates:BUILD.os_str_bytes-6.0.0.bazel"),
597    )
598
599    maybe(
600        http_archive,
601        name = "crates_vendor__percent-encoding-2.1.0",
602        sha256 = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e",
603        type = "tar.gz",
604        urls = ["https://static.crates.io/crates/percent-encoding/2.1.0/download"],
605        strip_prefix = "percent-encoding-2.1.0",
606        build_file = Label("@examples//vendor_external/crates:BUILD.percent-encoding-2.1.0.bazel"),
607    )
608
609    maybe(
610        http_archive,
611        name = "crates_vendor__ppv-lite86-0.2.16",
612        sha256 = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872",
613        type = "tar.gz",
614        urls = ["https://static.crates.io/crates/ppv-lite86/0.2.16/download"],
615        strip_prefix = "ppv-lite86-0.2.16",
616        build_file = Label("@examples//vendor_external/crates:BUILD.ppv-lite86-0.2.16.bazel"),
617    )
618
619    maybe(
620        http_archive,
621        name = "crates_vendor__proc-macro-error-1.0.4",
622        sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c",
623        type = "tar.gz",
624        urls = ["https://static.crates.io/crates/proc-macro-error/1.0.4/download"],
625        strip_prefix = "proc-macro-error-1.0.4",
626        build_file = Label("@examples//vendor_external/crates:BUILD.proc-macro-error-1.0.4.bazel"),
627    )
628
629    maybe(
630        http_archive,
631        name = "crates_vendor__proc-macro-error-attr-1.0.4",
632        sha256 = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869",
633        type = "tar.gz",
634        urls = ["https://static.crates.io/crates/proc-macro-error-attr/1.0.4/download"],
635        strip_prefix = "proc-macro-error-attr-1.0.4",
636        build_file = Label("@examples//vendor_external/crates:BUILD.proc-macro-error-attr-1.0.4.bazel"),
637    )
638
639    maybe(
640        http_archive,
641        name = "crates_vendor__proc-macro2-1.0.36",
642        sha256 = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029",
643        type = "tar.gz",
644        urls = ["https://static.crates.io/crates/proc-macro2/1.0.36/download"],
645        strip_prefix = "proc-macro2-1.0.36",
646        build_file = Label("@examples//vendor_external/crates:BUILD.proc-macro2-1.0.36.bazel"),
647    )
648
649    maybe(
650        http_archive,
651        name = "crates_vendor__pulldown-cmark-0.8.0",
652        sha256 = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8",
653        type = "tar.gz",
654        urls = ["https://static.crates.io/crates/pulldown-cmark/0.8.0/download"],
655        strip_prefix = "pulldown-cmark-0.8.0",
656        build_file = Label("@examples//vendor_external/crates:BUILD.pulldown-cmark-0.8.0.bazel"),
657    )
658
659    maybe(
660        http_archive,
661        name = "crates_vendor__quote-1.0.15",
662        sha256 = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145",
663        type = "tar.gz",
664        urls = ["https://static.crates.io/crates/quote/1.0.15/download"],
665        strip_prefix = "quote-1.0.15",
666        build_file = Label("@examples//vendor_external/crates:BUILD.quote-1.0.15.bazel"),
667    )
668
669    maybe(
670        http_archive,
671        name = "crates_vendor__rand-0.8.5",
672        sha256 = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404",
673        type = "tar.gz",
674        urls = ["https://static.crates.io/crates/rand/0.8.5/download"],
675        strip_prefix = "rand-0.8.5",
676        build_file = Label("@examples//vendor_external/crates:BUILD.rand-0.8.5.bazel"),
677    )
678
679    maybe(
680        http_archive,
681        name = "crates_vendor__rand_chacha-0.3.1",
682        sha256 = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88",
683        type = "tar.gz",
684        urls = ["https://static.crates.io/crates/rand_chacha/0.3.1/download"],
685        strip_prefix = "rand_chacha-0.3.1",
686        build_file = Label("@examples//vendor_external/crates:BUILD.rand_chacha-0.3.1.bazel"),
687    )
688
689    maybe(
690        http_archive,
691        name = "crates_vendor__rand_core-0.6.3",
692        sha256 = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7",
693        type = "tar.gz",
694        urls = ["https://static.crates.io/crates/rand_core/0.6.3/download"],
695        strip_prefix = "rand_core-0.6.3",
696        build_file = Label("@examples//vendor_external/crates:BUILD.rand_core-0.6.3.bazel"),
697    )
698
699    maybe(
700        http_archive,
701        name = "crates_vendor__regex-1.5.4",
702        sha256 = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461",
703        type = "tar.gz",
704        urls = ["https://static.crates.io/crates/regex/1.5.4/download"],
705        strip_prefix = "regex-1.5.4",
706        build_file = Label("@examples//vendor_external/crates:BUILD.regex-1.5.4.bazel"),
707    )
708
709    maybe(
710        http_archive,
711        name = "crates_vendor__regex-syntax-0.6.25",
712        sha256 = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b",
713        type = "tar.gz",
714        urls = ["https://static.crates.io/crates/regex-syntax/0.6.25/download"],
715        strip_prefix = "regex-syntax-0.6.25",
716        build_file = Label("@examples//vendor_external/crates:BUILD.regex-syntax-0.6.25.bazel"),
717    )
718
719    maybe(
720        http_archive,
721        name = "crates_vendor__semver-1.0.6",
722        sha256 = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d",
723        type = "tar.gz",
724        urls = ["https://static.crates.io/crates/semver/1.0.6/download"],
725        strip_prefix = "semver-1.0.6",
726        build_file = Label("@examples//vendor_external/crates:BUILD.semver-1.0.6.bazel"),
727    )
728
729    maybe(
730        http_archive,
731        name = "crates_vendor__serde-1.0.136",
732        sha256 = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789",
733        type = "tar.gz",
734        urls = ["https://static.crates.io/crates/serde/1.0.136/download"],
735        strip_prefix = "serde-1.0.136",
736        build_file = Label("@examples//vendor_external/crates:BUILD.serde-1.0.136.bazel"),
737    )
738
739    maybe(
740        http_archive,
741        name = "crates_vendor__strsim-0.10.0",
742        sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623",
743        type = "tar.gz",
744        urls = ["https://static.crates.io/crates/strsim/0.10.0/download"],
745        strip_prefix = "strsim-0.10.0",
746        build_file = Label("@examples//vendor_external/crates:BUILD.strsim-0.10.0.bazel"),
747    )
748
749    maybe(
750        http_archive,
751        name = "crates_vendor__syn-1.0.86",
752        sha256 = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b",
753        type = "tar.gz",
754        urls = ["https://static.crates.io/crates/syn/1.0.86/download"],
755        strip_prefix = "syn-1.0.86",
756        build_file = Label("@examples//vendor_external/crates:BUILD.syn-1.0.86.bazel"),
757    )
758
759    maybe(
760        http_archive,
761        name = "crates_vendor__termcolor-1.1.3",
762        sha256 = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755",
763        type = "tar.gz",
764        urls = ["https://static.crates.io/crates/termcolor/1.1.3/download"],
765        strip_prefix = "termcolor-1.1.3",
766        build_file = Label("@examples//vendor_external/crates:BUILD.termcolor-1.1.3.bazel"),
767    )
768
769    maybe(
770        http_archive,
771        name = "crates_vendor__textwrap-0.15.0",
772        sha256 = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb",
773        type = "tar.gz",
774        urls = ["https://static.crates.io/crates/textwrap/0.15.0/download"],
775        strip_prefix = "textwrap-0.15.0",
776        build_file = Label("@examples//vendor_external/crates:BUILD.textwrap-0.15.0.bazel"),
777    )
778
779    maybe(
780        http_archive,
781        name = "crates_vendor__tinyvec-1.5.1",
782        sha256 = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2",
783        type = "tar.gz",
784        urls = ["https://static.crates.io/crates/tinyvec/1.5.1/download"],
785        strip_prefix = "tinyvec-1.5.1",
786        build_file = Label("@examples//vendor_external/crates:BUILD.tinyvec-1.5.1.bazel"),
787    )
788
789    maybe(
790        http_archive,
791        name = "crates_vendor__tinyvec_macros-0.1.0",
792        sha256 = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c",
793        type = "tar.gz",
794        urls = ["https://static.crates.io/crates/tinyvec_macros/0.1.0/download"],
795        strip_prefix = "tinyvec_macros-0.1.0",
796        build_file = Label("@examples//vendor_external/crates:BUILD.tinyvec_macros-0.1.0.bazel"),
797    )
798
799    maybe(
800        http_archive,
801        name = "crates_vendor__toml-0.5.8",
802        sha256 = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa",
803        type = "tar.gz",
804        urls = ["https://static.crates.io/crates/toml/0.5.8/download"],
805        strip_prefix = "toml-0.5.8",
806        build_file = Label("@examples//vendor_external/crates:BUILD.toml-0.5.8.bazel"),
807    )
808
809    maybe(
810        http_archive,
811        name = "crates_vendor__unicase-2.6.0",
812        sha256 = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6",
813        type = "tar.gz",
814        urls = ["https://static.crates.io/crates/unicase/2.6.0/download"],
815        strip_prefix = "unicase-2.6.0",
816        build_file = Label("@examples//vendor_external/crates:BUILD.unicase-2.6.0.bazel"),
817    )
818
819    maybe(
820        http_archive,
821        name = "crates_vendor__unicode-bidi-0.3.7",
822        sha256 = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f",
823        type = "tar.gz",
824        urls = ["https://static.crates.io/crates/unicode-bidi/0.3.7/download"],
825        strip_prefix = "unicode-bidi-0.3.7",
826        build_file = Label("@examples//vendor_external/crates:BUILD.unicode-bidi-0.3.7.bazel"),
827    )
828
829    maybe(
830        http_archive,
831        name = "crates_vendor__unicode-normalization-0.1.19",
832        sha256 = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9",
833        type = "tar.gz",
834        urls = ["https://static.crates.io/crates/unicode-normalization/0.1.19/download"],
835        strip_prefix = "unicode-normalization-0.1.19",
836        build_file = Label("@examples//vendor_external/crates:BUILD.unicode-normalization-0.1.19.bazel"),
837    )
838
839    maybe(
840        http_archive,
841        name = "crates_vendor__unicode-xid-0.2.2",
842        sha256 = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3",
843        type = "tar.gz",
844        urls = ["https://static.crates.io/crates/unicode-xid/0.2.2/download"],
845        strip_prefix = "unicode-xid-0.2.2",
846        build_file = Label("@examples//vendor_external/crates:BUILD.unicode-xid-0.2.2.bazel"),
847    )
848
849    maybe(
850        http_archive,
851        name = "crates_vendor__url-2.2.2",
852        sha256 = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c",
853        type = "tar.gz",
854        urls = ["https://static.crates.io/crates/url/2.2.2/download"],
855        strip_prefix = "url-2.2.2",
856        build_file = Label("@examples//vendor_external/crates:BUILD.url-2.2.2.bazel"),
857    )
858
859    maybe(
860        http_archive,
861        name = "crates_vendor__version-sync-0.9.4",
862        sha256 = "99d0801cec07737d88cb900e6419f6f68733867f90b3faaa837e84692e101bf0",
863        type = "tar.gz",
864        urls = ["https://static.crates.io/crates/version-sync/0.9.4/download"],
865        strip_prefix = "version-sync-0.9.4",
866        build_file = Label("@examples//vendor_external/crates:BUILD.version-sync-0.9.4.bazel"),
867    )
868
869    maybe(
870        http_archive,
871        name = "crates_vendor__version_check-0.9.4",
872        sha256 = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f",
873        type = "tar.gz",
874        urls = ["https://static.crates.io/crates/version_check/0.9.4/download"],
875        strip_prefix = "version_check-0.9.4",
876        build_file = Label("@examples//vendor_external/crates:BUILD.version_check-0.9.4.bazel"),
877    )
878
879    maybe(
880        http_archive,
881        name = "crates_vendor__wasi-0.10.2-wasi-snapshot-preview1",
882        sha256 = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6",
883        type = "tar.gz",
884        urls = ["https://static.crates.io/crates/wasi/0.10.2+wasi-snapshot-preview1/download"],
885        strip_prefix = "wasi-0.10.2+wasi-snapshot-preview1",
886        build_file = Label("@examples//vendor_external/crates:BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel"),
887    )
888
889    maybe(
890        http_archive,
891        name = "crates_vendor__winapi-0.3.9",
892        sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419",
893        type = "tar.gz",
894        urls = ["https://static.crates.io/crates/winapi/0.3.9/download"],
895        strip_prefix = "winapi-0.3.9",
896        build_file = Label("@examples//vendor_external/crates:BUILD.winapi-0.3.9.bazel"),
897    )
898
899    maybe(
900        http_archive,
901        name = "crates_vendor__winapi-i686-pc-windows-gnu-0.4.0",
902        sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6",
903        type = "tar.gz",
904        urls = ["https://static.crates.io/crates/winapi-i686-pc-windows-gnu/0.4.0/download"],
905        strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0",
906        build_file = Label("@examples//vendor_external/crates:BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel"),
907    )
908
909    maybe(
910        http_archive,
911        name = "crates_vendor__winapi-util-0.1.5",
912        sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178",
913        type = "tar.gz",
914        urls = ["https://static.crates.io/crates/winapi-util/0.1.5/download"],
915        strip_prefix = "winapi-util-0.1.5",
916        build_file = Label("@examples//vendor_external/crates:BUILD.winapi-util-0.1.5.bazel"),
917    )
918
919    maybe(
920        http_archive,
921        name = "crates_vendor__winapi-x86_64-pc-windows-gnu-0.4.0",
922        sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f",
923        type = "tar.gz",
924        urls = ["https://static.crates.io/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download"],
925        strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0",
926        build_file = Label("@examples//vendor_external/crates:BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel"),
927    )
928
929    return [
930        struct(repo = "crates_vendor__clap-3.1.5", is_dev_dep = False),
931        struct(repo = "crates_vendor__rand-0.8.5", is_dev_dep = False),
932        struct(repo = "crates_vendor__version-sync-0.9.4", is_dev_dep = True),
933    ]
934