From adf2790f3ff063d909acd70aacdd2832756113a5 Mon Sep 17 00:00:00 2001 From: Marcel Hlopko Date: Fri, 25 Feb 2022 15:48:13 +0100 Subject: [PATCH 01/12] Remove unnecessary files (#1154) --- rust/toolchain.bzl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rust/toolchain.bzl b/rust/toolchain.bzl index 4a8da359a9..33799c5abb 100644 --- a/rust/toolchain.bzl +++ b/rust/toolchain.bzl @@ -304,47 +304,47 @@ def _generate_sysroot( # Rustc sysroot_rustc = _symlink_sysroot_bin(ctx, name, "bin", rustc) - direct_files.extend([sysroot_rustc, rustc]) + direct_files.extend([sysroot_rustc]) # Rustc dependencies sysroot_rustc_lib = None if rustc_lib: sysroot_rustc_lib = _symlink_sysroot_tree(ctx, name, rustc_lib) - transitive_file_sets.extend([sysroot_rustc_lib, rustc_lib.files]) + transitive_file_sets.extend([sysroot_rustc_lib]) # Rustdoc sysroot_rustdoc = _symlink_sysroot_bin(ctx, name, "bin", rustdoc) - direct_files.extend([sysroot_rustdoc, rustdoc]) + direct_files.extend([sysroot_rustdoc]) # Clippy sysroot_clippy = None if clippy: sysroot_clippy = _symlink_sysroot_bin(ctx, name, "bin", clippy) - direct_files.extend([sysroot_clippy, clippy]) + direct_files.extend([sysroot_clippy]) # Cargo sysroot_cargo = None if cargo: sysroot_cargo = _symlink_sysroot_bin(ctx, name, "bin", cargo) - direct_files.extend([sysroot_cargo, cargo]) + direct_files.extend([sysroot_cargo]) # Rustfmt sysroot_rustfmt = None if rustfmt: sysroot_rustfmt = _symlink_sysroot_bin(ctx, name, "bin", rustfmt) - direct_files.extend([sysroot_rustfmt, rustfmt]) + direct_files.extend([sysroot_rustfmt]) # Llvm tools sysroot_llvm_tools = None if llvm_tools: sysroot_llvm_tools = _symlink_sysroot_tree(ctx, name, llvm_tools) - transitive_file_sets.extend([sysroot_llvm_tools, llvm_tools.files]) + transitive_file_sets.extend([sysroot_llvm_tools]) # Rust standard library sysroot_rust_std = None if rust_std: sysroot_rust_std = _symlink_sysroot_tree(ctx, name, rust_std) - transitive_file_sets.extend([sysroot_rust_std, rust_std.files]) + transitive_file_sets.extend([sysroot_rust_std]) # Declare a file in the root of the sysroot to make locating the sysroot easy sysroot_anchor = ctx.actions.declare_file("{}/rust.sysroot".format(name)) From ac594a5fdff4bbe2ea16cc25425a998d0d3ecc3e Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Tue, 1 Mar 2022 06:45:19 -0800 Subject: [PATCH 02/12] Add alias for `cargo_bootstrap_repository` binaries (#1160) --- cargo/cargo_bootstrap.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cargo/cargo_bootstrap.bzl b/cargo/cargo_bootstrap.bzl index 6d6cdcff8c..bbe35c0548 100644 --- a/cargo/cargo_bootstrap.bzl +++ b/cargo/cargo_bootstrap.bzl @@ -116,6 +116,11 @@ exports_files([ "{binary}" ]) +alias( + name = "binary", + actual = "{binary}", +) + rust_binary( name = "install", rustc_env = {{ From acca6f400003b9ae097b69ba8f44878aaf65beed Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Tue, 1 Mar 2022 06:59:47 -0800 Subject: [PATCH 03/12] Add `user.bazelrc` support to each workspace (#1161) --- .bazelrc | 10 +++++++--- .gitignore | 1 + examples/.bazelrc | 6 +++++- examples/crate_universe/.bazelrc | 6 +++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index 5b3cd4157e..dcff4e65d6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,5 +1,5 @@ # `.bazelrc` is a Bazel configuration file. -# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file +# https://bazel.build/docs/best-practices#bazelrc-file # Enable rustfmt for all targets in the workspace build:rustfmt --aspects=//rust:defs.bzl%rustfmt_aspect @@ -9,5 +9,9 @@ build:rustfmt --output_groups=+rustfmt_checks build:clippy --aspects=//rust:defs.bzl%rust_clippy_aspect build:clippy --output_groups=+clippy_checks -# https://bazel.googlesource.com/bazel/+/master/site/docs/windows.md#enable-symlink-support -startup --windows_enable_symlinks \ No newline at end of file +# https://bazel.build/docs/windows#symlink +startup --windows_enable_symlinks + +# This import should always be last to allow users to override +# settings for local development. +try-import %workspace%/user.bazelrc diff --git a/.gitignore b/.gitignore index 52814c8a7c..ca118a20f7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /examples/bazel-* /examples/crate_universe/*/bazel-* /docs/bazel-* +user.bazelrc # rustfmt *.rs.bk diff --git a/examples/.bazelrc b/examples/.bazelrc index 7dcdbcf2bb..30c4a08670 100644 --- a/examples/.bazelrc +++ b/examples/.bazelrc @@ -1,5 +1,5 @@ # `.bazelrc` is a Bazel configuration file. -# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file +# https://bazel.build/docs/best-practices#bazelrc-file # Enable rustfmt for all targets in the workspace build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect @@ -8,3 +8,7 @@ build:rustfmt --output_groups=+rustfmt_checks # Enable clippy for all targets in the workspace build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect build:clippy --output_groups=+clippy_checks + +# This import should always be last to allow users to override +# settings for local development. +try-import %workspace%/user.bazelrc diff --git a/examples/crate_universe/.bazelrc b/examples/crate_universe/.bazelrc index 7dcdbcf2bb..30c4a08670 100644 --- a/examples/crate_universe/.bazelrc +++ b/examples/crate_universe/.bazelrc @@ -1,5 +1,5 @@ # `.bazelrc` is a Bazel configuration file. -# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file +# https://bazel.build/docs/best-practices#bazelrc-file # Enable rustfmt for all targets in the workspace build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect @@ -8,3 +8,7 @@ build:rustfmt --output_groups=+rustfmt_checks # Enable clippy for all targets in the workspace build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect build:clippy --output_groups=+clippy_checks + +# This import should always be last to allow users to override +# settings for local development. +try-import %workspace%/user.bazelrc From 59fab4e79f62bfa13551ac851a40696c24c0c3a4 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 3 Mar 2022 06:49:27 -0800 Subject: [PATCH 04/12] Replaced `crates_universe` rule with `crates_repository` (#1158) * Added unmodified `cargo-bazel` source code * Applied `rules_rust` specific updates to `cargo-bazel` impl * Updated lockfiles * Replaced `crate_universe` examples with `crates_repository` examples * Applied `rules_rust` specific updates to `cargo-bazel` examples * Updated examples lockfiles * Updated `crate_universe` docs to represent `crates_repository` * Regenerate documentation --- .bazelci/presubmit.yml | 36 +- WORKSPACE.bazel | 4 + crate_universe/3rdparty/BUILD.bazel | 20 + crate_universe/3rdparty/BUILD.libgit2.bazel | 277 + crate_universe/3rdparty/BUILD.zlib.bazel | 25 + .../crates/BUILD.aho-corasick-0.7.18.bazel | 87 + .../3rdparty/crates/BUILD.anyhow-1.0.55.bazel | 175 + .../3rdparty/crates/BUILD.atty-0.2.14.bazel | 124 + .../3rdparty/crates/BUILD.autocfg-1.1.0.bazel | 84 + crate_universe/3rdparty/crates/BUILD.bazel | 166 + .../crates/BUILD.bitflags-1.3.2.bazel | 85 + .../crates/BUILD.block-buffer-0.10.2.bazel | 85 + .../crates/BUILD.block-buffer-0.7.3.bazel | 88 + .../crates/BUILD.block-padding-0.1.5.bazel | 85 + .../3rdparty/crates/BUILD.bstr-0.2.17.bazel | 86 + .../crates/BUILD.byte-tools-0.3.1.bazel | 84 + .../crates/BUILD.byteorder-1.4.3.bazel | 84 + .../3rdparty/crates/BUILD.camino-1.0.7.bazel | 176 + .../crates/BUILD.cargo-lock-7.0.1.bazel | 154 + .../crates/BUILD.cargo-platform-0.1.2.bazel | 85 + .../crates/BUILD.cargo_metadata-0.14.2.bazel | 90 + .../crates/BUILD.cargo_toml-0.11.4.bazel | 87 + .../3rdparty/crates/BUILD.cc-1.0.73.bazel | 152 + .../crates/BUILD.cfg-expr-0.10.2.bazel | 86 + .../3rdparty/crates/BUILD.cfg-if-1.0.0.bazel | 84 + .../3rdparty/crates/BUILD.chrono-0.4.19.bazel | 104 + .../crates/BUILD.chrono-tz-0.6.1.bazel | 178 + .../crates/BUILD.chrono-tz-build-0.0.2.bazel | 87 + .../3rdparty/crates/BUILD.clap-3.1.5.bazel | 104 + .../crates/BUILD.clap_derive-3.1.4.bazel | 90 + .../crates/BUILD.cpufeatures-0.2.1.bazel | 102 + .../crates/BUILD.crates-index-0.18.7.bazel | 95 + .../crates/BUILD.crossbeam-utils-0.8.7.bazel | 179 + .../crates/BUILD.crypto-common-0.1.3.bazel | 87 + .../crates/BUILD.deunicode-0.4.3.bazel | 84 + .../3rdparty/crates/BUILD.digest-0.10.3.bazel | 91 + .../3rdparty/crates/BUILD.digest-0.8.1.bazel | 85 + .../crates/BUILD.fake-simd-0.1.2.bazel | 84 + .../crates/BUILD.fastrand-1.7.0.bazel | 94 + .../3rdparty/crates/BUILD.fnv-1.0.7.bazel | 86 + .../crates/BUILD.form_urlencoded-1.0.1.bazel | 86 + .../crates/BUILD.fuchsia-cprng-0.1.1.bazel | 84 + .../crates/BUILD.generic-array-0.12.4.bazel | 85 + .../crates/BUILD.generic-array-0.14.5.bazel | 175 + .../crates/BUILD.getrandom-0.2.5.bazel | 122 + .../3rdparty/crates/BUILD.git2-0.14.1.bazel | 89 + .../3rdparty/crates/BUILD.globset-0.4.8.bazel | 89 + .../crates/BUILD.globwalk-0.8.1.bazel | 87 + .../crates/BUILD.hashbrown-0.11.2.bazel | 85 + .../3rdparty/crates/BUILD.heck-0.4.0.bazel | 85 + .../crates/BUILD.hermit-abi-0.1.19.bazel | 86 + .../3rdparty/crates/BUILD.hex-0.4.3.bazel | 89 + .../3rdparty/crates/BUILD.home-0.5.3.bazel | 94 + .../crates/BUILD.humansize-1.1.1.bazel | 84 + .../3rdparty/crates/BUILD.idna-0.2.3.bazel | 87 + .../3rdparty/crates/BUILD.ignore-0.4.18.bazel | 112 + .../crates/BUILD.indexmap-1.8.0.bazel | 175 + .../crates/BUILD.instant-0.1.12.bazel | 85 + .../3rdparty/crates/BUILD.itoa-1.0.1.bazel | 84 + .../crates/BUILD.jobserver-0.1.24.bazel | 109 + .../crates/BUILD.lazy_static-1.4.0.bazel | 84 + .../3rdparty/crates/BUILD.libc-0.2.119.bazel | 175 + .../BUILD.libgit2-sys-0.13.1+1.4.2.bazel | 87 + .../crates/BUILD.libz-sys-1.1.3.bazel | 87 + .../3rdparty/crates/BUILD.log-0.4.14.bazel | 172 + .../3rdparty/crates/BUILD.maplit-1.0.2.bazel | 84 + .../3rdparty/crates/BUILD.matches-0.1.9.bazel | 84 + .../3rdparty/crates/BUILD.memchr-2.4.1.bazel | 175 + .../3rdparty/crates/BUILD.num-0.1.42.bazel | 98 + .../crates/BUILD.num-bigint-0.1.44.bazel | 91 + .../crates/BUILD.num-complex-0.1.43.bazel | 88 + .../crates/BUILD.num-integer-0.1.44.bazel | 177 + .../crates/BUILD.num-iter-0.1.42.bazel | 178 + .../crates/BUILD.num-rational-0.1.42.bazel | 92 + .../crates/BUILD.num-traits-0.2.14.bazel | 176 + .../crates/BUILD.num_cpus-1.13.1.bazel | 116 + .../crates/BUILD.once_cell-1.9.0.bazel | 88 + .../crates/BUILD.opaque-debug-0.2.3.bazel | 84 + .../crates/BUILD.os_str_bytes-6.0.0.bazel | 88 + .../crates/BUILD.parse-zoneinfo-0.3.0.bazel | 85 + .../crates/BUILD.pathdiff-0.2.1.bazel | 84 + .../crates/BUILD.percent-encoding-2.1.0.bazel | 84 + .../3rdparty/crates/BUILD.pest-2.1.3.bazel | 85 + .../crates/BUILD.pest_derive-2.1.0.bazel | 86 + .../crates/BUILD.pest_generator-2.1.3.bazel | 89 + .../crates/BUILD.pest_meta-2.1.3.bazel | 86 + .../3rdparty/crates/BUILD.phf-0.10.1.bazel | 86 + .../crates/BUILD.phf_codegen-0.10.0.bazel | 86 + .../crates/BUILD.phf_generator-0.10.0.bazel | 150 + .../crates/BUILD.phf_shared-0.10.0.bazel | 89 + .../crates/BUILD.pkg-config-0.3.24.bazel | 84 + .../crates/BUILD.ppv-lite86-0.2.16.bazel | 86 + .../crates/BUILD.proc-macro-error-1.0.4.bazel | 182 + .../BUILD.proc-macro-error-attr-1.0.4.bazel | 174 + .../crates/BUILD.proc-macro2-1.0.36.bazel | 176 + .../3rdparty/crates/BUILD.quote-1.0.15.bazel | 87 + .../3rdparty/crates/BUILD.rand-0.4.6.bazel | 132 + .../3rdparty/crates/BUILD.rand-0.8.5.bazel | 121 + .../crates/BUILD.rand_chacha-0.3.1.bazel | 87 + .../crates/BUILD.rand_core-0.3.1.bazel | 85 + .../crates/BUILD.rand_core-0.4.2.bazel | 84 + .../crates/BUILD.rand_core-0.6.3.bazel | 88 + .../3rdparty/crates/BUILD.rdrand-0.4.0.bazel | 87 + .../crates/BUILD.redox_syscall-0.2.11.bazel | 85 + .../3rdparty/crates/BUILD.regex-1.5.4.bazel | 104 + .../crates/BUILD.regex-syntax-0.6.25.bazel | 93 + .../crates/BUILD.remove_dir_all-0.5.3.bazel | 94 + .../crates/BUILD.rustc-hash-1.1.0.bazel | 86 + .../crates/BUILD.rustc-serialize-0.3.24.bazel | 84 + .../3rdparty/crates/BUILD.ryu-1.0.9.bazel | 84 + .../crates/BUILD.same-file-1.0.6.bazel | 94 + .../3rdparty/crates/BUILD.semver-1.0.6.bazel | 178 + .../3rdparty/crates/BUILD.serde-1.0.136.bazel | 182 + .../crates/BUILD.serde_derive-1.0.136.bazel | 176 + .../crates/BUILD.serde_json-1.0.79.bazel | 180 + .../3rdparty/crates/BUILD.sha-1-0.8.2.bazel | 88 + .../3rdparty/crates/BUILD.sha2-0.10.2.bazel | 113 + .../crates/BUILD.siphasher-0.3.9.bazel | 86 + .../3rdparty/crates/BUILD.slug-0.1.4.bazel | 85 + .../crates/BUILD.smallvec-1.8.0.bazel | 84 + .../crates/BUILD.smartstring-1.0.0.bazel | 89 + .../3rdparty/crates/BUILD.smawk-0.3.1.bazel | 84 + .../crates/BUILD.spectral-0.6.0.bazel | 87 + .../BUILD.static_assertions-1.1.0.bazel | 84 + .../3rdparty/crates/BUILD.strsim-0.10.0.bazel | 84 + .../3rdparty/crates/BUILD.syn-1.0.86.bazel | 190 + .../crates/BUILD.tempfile-3.3.0.bazel | 134 + .../3rdparty/crates/BUILD.tera-1.15.0.bazel | 106 + .../crates/BUILD.termcolor-1.1.3.bazel | 94 + .../crates/BUILD.textwrap-0.14.2.bazel | 91 + .../crates/BUILD.textwrap-0.15.0.bazel | 84 + .../crates/BUILD.thread_local-1.1.4.bazel | 85 + .../3rdparty/crates/BUILD.tinyvec-1.5.1.bazel | 88 + .../crates/BUILD.tinyvec_macros-0.1.0.bazel | 84 + .../3rdparty/crates/BUILD.toml-0.5.8.bazel | 86 + .../crates/BUILD.typenum-1.15.0.bazel | 171 + .../crates/BUILD.ucd-trie-0.1.3.bazel | 86 + .../3rdparty/crates/BUILD.uncased-0.9.6.bazel | 172 + .../BUILD.unic-char-property-0.9.0.bazel | 85 + .../crates/BUILD.unic-char-range-0.9.0.bazel | 85 + .../crates/BUILD.unic-common-0.9.0.bazel | 85 + .../crates/BUILD.unic-segment-0.9.0.bazel | 85 + .../crates/BUILD.unic-ucd-segment-0.9.0.bazel | 87 + .../crates/BUILD.unic-ucd-version-0.9.0.bazel | 85 + .../crates/BUILD.unicode-bidi-0.3.7.bazel | 86 + .../BUILD.unicode-linebreak-0.1.2.bazel | 172 + .../BUILD.unicode-normalization-0.1.19.bazel | 87 + .../crates/BUILD.unicode-width-0.1.9.bazel | 85 + .../crates/BUILD.unicode-xid-0.2.2.bazel | 85 + .../3rdparty/crates/BUILD.url-2.2.2.bazel | 88 + .../3rdparty/crates/BUILD.vcpkg-0.2.15.bazel | 84 + .../crates/BUILD.version_check-0.9.4.bazel | 84 + .../3rdparty/crates/BUILD.walkdir-2.3.2.bazel | 97 + ...D.wasi-0.10.2+wasi-snapshot-preview1.bazel | 86 + .../3rdparty/crates/BUILD.winapi-0.3.9.bazel | 213 + ...ILD.winapi-i686-pc-windows-gnu-0.4.0.bazel | 171 + .../crates/BUILD.winapi-util-0.1.5.bazel | 94 + ...D.winapi-x86_64-pc-windows-gnu-0.4.0.bazel | 171 + crate_universe/3rdparty/crates/crates.bzl | 25 + crate_universe/3rdparty/crates/defs.bzl | 1979 +++ crate_universe/3rdparty/third_party_deps.bzl | 28 + crate_universe/BUILD.bazel | 131 +- crate_universe/CONTRIBUTING.md | 35 - crate_universe/Cargo.Bazel.lock | 8022 ++++++++++++ crate_universe/Cargo.lock | 1394 +- crate_universe/Cargo.toml | 73 +- crate_universe/Cross.toml | 18 - crate_universe/README.md | 17 +- crate_universe/bootstrap.bzl | 29 - crate_universe/crates.bzl | 68 + crate_universe/crates_deps.bzl | 8 + crate_universe/defs.bzl | 507 +- crate_universe/deps_bootstrap.bzl | 25 + crate_universe/private/BUILD.bazel | 26 +- .../private/bootstrap/.bazelversion | 1 - crate_universe/private/bootstrap/.gitignore | 8 - crate_universe/private/bootstrap/BUILD.bazel | 50 - crate_universe/private/bootstrap/README.md | 26 - .../private/bootstrap/WORKSPACE.bazel | 10 - crate_universe/private/bootstrap/build.sh | 87 - crate_universe/private/bootstrap/install.sh | 22 - crate_universe/private/bootstrap_utils.bzl | 106 + crate_universe/private/common_utils.bzl | 109 + crate_universe/private/crate.bzl | 172 + crate_universe/private/crates_repository.bzl | 244 + crate_universe/private/crates_vendor.bzl | 334 + crate_universe/private/defaults.bzl | 15 - crate_universe/private/defaults.bzl.template | 15 - crate_universe/private/generate_utils.bzl | 410 + crate_universe/private/selects.bzl | 56 + crate_universe/private/splicing_utils.bzl | 208 + crate_universe/private/srcs.bzl | 51 + crate_universe/private/test/BUILD.bazel | 15 + crate_universe/private/urls.bzl | 25 + crate_universe/private/util.bzl | 152 - crate_universe/private/vendor/BUILD.bazel | 11 + crate_universe/private/vendor_utils.bzl | 74 + crate_universe/src/cli.rs | 42 + crate_universe/src/cli/generate.rs | 142 + crate_universe/src/cli/query.rs | 87 + crate_universe/src/cli/splice.rs | 90 + crate_universe/src/cli/vendor.rs | 167 + crate_universe/src/config.rs | 599 +- crate_universe/src/consolidator.rs | 261 - crate_universe/src/context.rs | 511 + crate_universe/src/context/crate_context.rs | 838 ++ crate_universe/src/context/platforms.rs | 269 + crate_universe/src/lib.rs | 34 +- crate_universe/src/lockfile.rs | 423 + crate_universe/src/main.rs | 108 +- crate_universe/src/metadata.rs | 241 + crate_universe/src/metadata/dependency.rs | 363 + .../src/metadata/metadata_annotation.rs | 555 + crate_universe/src/parser.rs | 456 - crate_universe/src/renderer.rs | 907 -- crate_universe/src/rendering.rs | 470 + .../src/rendering/template_engine.rs | 399 + .../rendering/templates/crate_build_file.j2 | 44 + .../rendering/templates/module_build_file.j2 | 49 + .../src/rendering/templates/module_bzl.j2 | 338 + .../templates/partials/crate/aliases.j2 | 32 + .../templates/partials/crate/binary.j2 | 18 + .../templates/partials/crate/build_script.j2 | 70 + .../templates/partials/crate/common_attrs.j2 | 34 + .../templates/partials/crate/deps.j2 | 36 + .../templates/partials/crate/library.j2 | 15 + .../templates/partials/crate/proc_macro.j2 | 15 + .../rendering/templates/partials/header.j2 | 6 + .../templates/partials/module/aliases_map.j2 | 53 + .../templates/partials/module/deps_map.j2 | 50 + .../templates/partials/module/repo_git.j2 | 41 + .../templates/partials/module/repo_http.j2 | 28 + .../templates/partials/starlark/glob.j2 | 12 + .../partials/starlark/selectable_dict.j2 | 36 + .../partials/starlark/selectable_list.j2 | 31 + .../src/rendering/templates/vendor_module.j2 | 25 + crate_universe/src/resolver.rs | 441 - crate_universe/src/serde_utils.rs | 122 - crate_universe/src/splicing.rs | 495 + crate_universe/src/splicing/cargo_config.rs | 244 + crate_universe/src/splicing/splicer.rs | 1443 +++ .../src/templates/BUILD.crate.bazel.template | 41 - .../src/templates/defs.bzl.template | 31 - .../src/templates/helper_functions.template | 92 - .../templates/partials/build_script.template | 61 - .../templates/partials/common_attrs.template | 41 - .../default_data_dependencies.template | 12 - .../partials/git_repository.template | 9 - .../templates/partials/http_archive.template | 11 - .../templates/partials/rust_binary.template | 27 - .../templates/partials/rust_library.template | 36 - .../partials/targeted_aliases.template | 10 - ...ed_build_script_data_dependencies.template | 17 - ...argeted_build_script_dependencies.template | 17 - .../targeted_data_dependencies.template | 17 - .../partials/targeted_dependencies.template | 17 - crate_universe/src/test.rs | 153 + crate_universe/src/testing.rs | 133 - crate_universe/src/utils.rs | 15 + crate_universe/src/utils/starlark.rs | 12 + crate_universe/src/utils/starlark/glob.rs | 16 + crate_universe/src/utils/starlark/label.rs | 317 + crate_universe/src/utils/starlark/select.rs | 166 + .../test_data/metadata/aliases/Cargo.lock | 376 + .../test_data/metadata/aliases/Cargo.toml | 23 + .../test_data/metadata/aliases/metadata.json | 7997 ++++++++++++ .../metadata/build_scripts/Cargo.lock | 100 + .../metadata/build_scripts/Cargo.toml | 14 + .../metadata/build_scripts/metadata.json | 1802 +++ .../test_data/metadata/common/Cargo.lock | 23 + .../test_data/metadata/common/Cargo.toml | 23 + .../test_data/metadata/common/metadata.json | 431 + .../test_data/metadata/crate_types/Cargo.lock | 208 + .../test_data/metadata/crate_types/Cargo.toml | 15 + .../metadata/crate_types/metadata.json | 4863 +++++++ .../test_data/metadata/git_repos/Cargo.lock | 92 + .../test_data/metadata/git_repos/Cargo.toml | 12 + .../metadata/git_repos/metadata.json | 2642 ++++ .../metadata/multi_cfg_dep/Cargo.lock | 25 + .../metadata/multi_cfg_dep/Cargo.toml | 14 + .../metadata/multi_cfg_dep/metadata.json | 340 + .../test_data/metadata/no_deps/Cargo.lock | 7 + .../test_data/metadata/no_deps/Cargo.toml | 9 + .../test_data/metadata/no_deps/metadata.json | 63 + crate_universe/test_data/private/BUILD.bazel | 14 + .../test_data/private/metadata_generator.py | 87 + crate_universe/tests/parser.rs | 409 - .../third_party/openssl/BUILD.bazel | 11 - .../openssl/openssl_repositories.bzl | 45 - crate_universe/tools/BUILD.bazel | 8 + .../tools/cross_installer/BUILD.bazel | 37 + .../tools/cross_installer/Cargo.toml | 13 + .../tools/cross_installer/Cross.toml | 26 + .../cross_installer/cross_installer_deps.bzl | 50 + .../tools/cross_installer/src/main.rs | 99 + .../tools/urls_generator/BUILD.bazel | 30 + .../tools/urls_generator/Cargo.toml | 16 + .../tools/urls_generator/src/main.rs | 183 + crate_universe/version.bzl | 3 + docs/BUILD.bazel | 15 +- docs/WORKSPACE.bazel | 4 + docs/crate_universe.md | 495 +- docs/crate_universe.vm | 114 - docs/flatten.md | 165 - docs/symbols.bzl | 6 +- examples/crate_universe/README.md | 23 +- examples/crate_universe/WORKSPACE.bazel | 322 +- examples/crate_universe/basic/BUILD.bazel | 19 - examples/crate_universe/basic/src/main.rs | 22 - examples/crate_universe/basic/test.sh | 4 - examples/crate_universe/basic/workspace.bzl | 24 - .../crate_universe/cargo_aliases/.bazelrc | 13 + .../crate_universe/cargo_aliases/BUILD.bazel | 26 + .../cargo_aliases/Cargo.Bazel.lock | 2608 ++++ .../crate_universe/cargo_aliases/Cargo.lock | 428 + .../crate_universe/cargo_aliases/Cargo.toml | 21 + .../crate_universe/cargo_aliases/src/lib.rs | 38 + .../crate_universe/cargo_local/BUILD.bazel | 18 + .../crate_universe/cargo_local/Cargo.lock | 417 + .../crate_universe/cargo_local/Cargo.toml | 12 + .../crate_universe/cargo_local/src/lib.rs | 44 + examples/crate_universe/cargo_remote/.bazelrc | 13 + .../crate_universe/cargo_remote/BUILD.bazel | 14 + .../cargo_remote/BUILD.names.bazel | 67 + .../cargo_remote/remote_crate_test.rs | 18 + .../crate_universe/cargo_workspace/.bazelrc | 13 + .../cargo_workspace/BUILD.bazel | 0 .../cargo_workspace/Cargo.Bazel.lock | 1462 +++ .../crate_universe/cargo_workspace/Cargo.toml | 6 + .../cargo_workspace/num_printer/BUILD.bazel | 13 + .../cargo_workspace/num_printer/Cargo.toml | 13 + .../cargo_workspace/num_printer/src/main.rs | 24 + .../cargo_workspace/printer/BUILD.bazel | 18 + .../cargo_workspace/printer/Cargo.toml | 8 + .../cargo_workspace/printer/src/lib.rs | 38 + .../cargo_workspace/rng/BUILD.bazel | 13 + .../cargo_workspace/rng/Cargo.toml | 7 + .../cargo_workspace/rng/src/lib.rs | 7 + .../extra_workspace_members/.bazelrc | 13 + .../extra_workspace_members/BUILD.bazel | 22 + .../extra_workspace_members/Cargo.Bazel.lock | 3273 +++++ .../extra_workspace_members/Cargo.toml | 11 + .../extra_workspace_members/src/main.rs | 39 + .../has_aliased_deps/BUILD.bazel | 18 - .../has_aliased_deps/Cargo.lock | 1068 -- .../has_aliased_deps/Cargo.toml | 9 - .../has_aliased_deps/src/bin.rs | 1 - .../crate_universe/has_aliased_deps/test.sh | 3 - .../has_aliased_deps/workspace.bzl | 41 - .../crate_universe/multi_package/.bazelrc | 13 + .../multi_package/3rdparty/BUILD.bazel | 4 + .../multi_package/3rdparty/BUILD.curl.bazel | 56 + .../3rdparty/BUILD.libssh2.bazel | 34 + .../multi_package/3rdparty}/BUILD.nasm.bazel | 3 - .../3rdparty}/BUILD.openssl.bazel | 23 +- .../multi_package/3rdparty}/BUILD.perl.bazel | 3 - .../3rdparty/third_party_deps.bzl | 85 + .../crate_universe/multi_package/BUILD.bazel | 0 .../multi_package/Cargo.Bazel.lock | 10784 ++++++++++++++++ .../multi_package/pkg_a/BUILD.bazel | 32 + .../multi_package/pkg_a/Cargo.lock | 1864 +++ .../multi_package/pkg_a/Cargo.toml | 13 + .../multi_package/pkg_a/src/lib.rs | 40 + .../multi_package/sub_pkgs/pkg_b/BUILD.bazel | 32 + .../multi_package/sub_pkgs/pkg_b/Cargo.lock | 100 + .../sub_pkgs/pkg_b}/Cargo.toml | 5 +- .../multi_package/sub_pkgs/pkg_b/src/lib.rs | 13 + .../multi_package/sub_pkgs/pkg_c/BUILD.bazel | 18 + .../multi_package/sub_pkgs/pkg_c/Cargo.lock | 74 + .../multi_package/sub_pkgs/pkg_c/Cargo.toml | 12 + .../multi_package/sub_pkgs/pkg_c/src/lib.rs | 29 + .../no_cargo_manifests/.bazelrc | 13 + .../no_cargo_manifests/BUILD.bazel | 25 + .../no_cargo_manifests/Cargo.Bazel.lock | 5006 +++++++ .../no_cargo_manifests/src/main.rs | 150 + .../uses_proc_macro/BUILD.bazel | 18 - .../crate_universe/uses_proc_macro/Cargo.lock | 223 - .../uses_proc_macro/src/main.rs | 12 - .../crate_universe/uses_proc_macro/test.sh | 3 - .../uses_proc_macro/workspace.bzl | 10 - .../crate_universe/uses_sys_crate/BUILD.bazel | 19 - .../crate_universe/uses_sys_crate/Cargo.lock | 47 - .../crate_universe/uses_sys_crate/Cargo.toml | 8 - .../crate_universe/uses_sys_crate/src/main.rs | 41 - .../crate_universe/uses_sys_crate/test.sh | 6 - .../uses_sys_crate/workspace.bzl | 20 - .../vendor_local_manifests/.gitignore | 3 + .../vendor_local_manifests/BUILD.bazel | 25 + .../vendor_local_manifests/Cargo.lock | 356 + .../vendor_local_manifests/Cargo.toml | 14 + .../vendor_local_manifests/crates/BUILD.bazel | 46 + .../crates/async-stream-0.3.2/BUILD.bazel | 86 + .../async-stream-impl-0.3.2/BUILD.bazel | 87 + .../crates/bitflags-1.3.2/BUILD.bazel | 85 + .../crates/bytes-1.1.0/BUILD.bazel | 86 + .../crates/cfg-if-1.0.0/BUILD.bazel | 84 + .../vendor_local_manifests/crates/defs.bzl | 368 + .../crates/fastrand-1.7.0/BUILD.bazel | 94 + .../crates/futures-core-0.3.21/BUILD.bazel | 177 + .../crates/hermit-abi-0.1.19/BUILD.bazel | 86 + .../crates/instant-0.1.12/BUILD.bazel | 85 + .../crates/libc-0.2.119/BUILD.bazel | 175 + .../crates/lock_api-0.4.6/BUILD.bazel | 85 + .../crates/log-0.4.14/BUILD.bazel | 172 + .../crates/memchr-2.4.1/BUILD.bazel | 175 + .../crates/mio-0.7.14/BUILD.bazel | 132 + .../crates/miow-0.3.7/BUILD.bazel | 85 + .../crates/ntapi-0.3.7/BUILD.bazel | 176 + .../crates/num_cpus-1.13.1/BUILD.bazel | 116 + .../crates/once_cell-1.9.0/BUILD.bazel | 88 + .../crates/parking_lot-0.11.2/BUILD.bazel | 88 + .../crates/parking_lot_core-0.8.5/BUILD.bazel | 222 + .../crates/pin-project-lite-0.2.8/BUILD.bazel | 84 + .../crates/proc-macro2-1.0.36/BUILD.bazel | 176 + .../crates/quote-1.0.15/BUILD.bazel | 87 + .../crates/redox_syscall-0.2.11/BUILD.bazel | 85 + .../crates/remove_dir_all-0.5.3/BUILD.bazel | 94 + .../crates/scopeguard-1.1.0/BUILD.bazel | 84 + .../signal-hook-registry-1.4.0/BUILD.bazel | 85 + .../crates/smallvec-1.8.0/BUILD.bazel | 84 + .../crates/syn-1.0.86/BUILD.bazel | 194 + .../crates/tempfile-3.3.0/BUILD.bazel | 134 + .../crates/tokio-1.16.1/BUILD.bazel | 166 + .../crates/tokio-macros-1.7.0/BUILD.bazel | 87 + .../crates/tokio-stream-0.1.8/BUILD.bazel | 89 + .../crates/tokio-test-0.4.2/BUILD.bazel | 89 + .../crates/unicode-xid-0.2.2/BUILD.bazel | 85 + .../crates/winapi-0.3.9/BUILD.bazel | 237 + .../BUILD.bazel | 171 + .../BUILD.bazel | 171 + .../vendor_local_manifests/src/lib.rs | 44 + .../vendor_local_pkgs/.gitignore | 3 + .../vendor_local_pkgs/BUILD.bazel | 72 + .../vendor_local_pkgs/crates/BUILD.bazel | 82 + .../crates/ansi_term-0.12.1/BUILD.bazel | 94 + .../crates/async-trait-0.1.52/BUILD.bazel | 174 + .../crates/autocfg-1.1.0/BUILD.bazel | 84 + .../crates/axum-0.4.8/BUILD.bazel | 114 + .../crates/axum-core-0.1.2/BUILD.bazel | 90 + .../crates/bitflags-1.3.2/BUILD.bazel | 85 + .../crates/bytes-1.1.0/BUILD.bazel | 86 + .../crates/cfg-if-1.0.0/BUILD.bazel | 84 + .../vendor_local_pkgs/crates/defs.bzl | 368 + .../crates/fnv-1.0.7/BUILD.bazel | 86 + .../crates/form_urlencoded-1.0.1/BUILD.bazel | 86 + .../crates/futures-channel-0.3.21/BUILD.bazel | 178 + .../crates/futures-core-0.3.21/BUILD.bazel | 177 + .../crates/futures-sink-0.3.21/BUILD.bazel | 87 + .../crates/futures-task-0.3.21/BUILD.bazel | 173 + .../crates/futures-util-0.3.21/BUILD.bazel | 177 + .../crates/h2-0.3.11/BUILD.bazel | 95 + .../crates/hashbrown-0.11.2/BUILD.bazel | 85 + .../crates/hermit-abi-0.1.19/BUILD.bazel | 86 + .../crates/http-0.2.6/BUILD.bazel | 87 + .../crates/http-body-0.4.4/BUILD.bazel | 87 + .../http-range-header-0.3.0/BUILD.bazel | 84 + .../crates/httparse-1.6.0/BUILD.bazel | 175 + .../crates/httpdate-1.0.2/BUILD.bazel | 84 + .../crates/hyper-0.14.17/BUILD.bazel | 111 + .../crates/indexmap-1.8.0/BUILD.bazel | 175 + .../crates/instant-0.1.12/BUILD.bazel | 85 + .../crates/itoa-1.0.1/BUILD.bazel | 84 + .../crates/lazy_static-1.4.0/BUILD.bazel | 84 + .../crates/libc-0.2.119/BUILD.bazel | 175 + .../crates/lock_api-0.4.6/BUILD.bazel | 85 + .../crates/log-0.4.14/BUILD.bazel | 174 + .../crates/matches-0.1.9/BUILD.bazel | 84 + .../crates/matchit-0.4.6/BUILD.bazel | 85 + .../crates/memchr-2.4.1/BUILD.bazel | 175 + .../crates/mime-0.3.16/BUILD.bazel | 84 + .../crates/mio-0.7.14/BUILD.bazel | 132 + .../crates/miow-0.3.7/BUILD.bazel | 85 + .../crates/ntapi-0.3.7/BUILD.bazel | 176 + .../crates/num_cpus-1.13.1/BUILD.bazel | 116 + .../crates/once_cell-1.9.0/BUILD.bazel | 88 + .../crates/parking_lot-0.11.2/BUILD.bazel | 88 + .../crates/parking_lot_core-0.8.5/BUILD.bazel | 222 + .../crates/percent-encoding-2.1.0/BUILD.bazel | 84 + .../crates/pin-project-1.0.10/BUILD.bazel | 85 + .../pin-project-internal-1.0.10/BUILD.bazel | 87 + .../crates/pin-project-lite-0.2.8/BUILD.bazel | 84 + .../crates/pin-utils-0.1.0/BUILD.bazel | 84 + .../crates/proc-macro2-1.0.36/BUILD.bazel | 176 + .../crates/quote-1.0.15/BUILD.bazel | 87 + .../crates/redox_syscall-0.2.11/BUILD.bazel | 85 + .../crates/ryu-1.0.9/BUILD.bazel | 84 + .../crates/scopeguard-1.1.0/BUILD.bazel | 84 + .../crates/serde-1.0.136/BUILD.bazel | 175 + .../crates/serde_json-1.0.79/BUILD.bazel | 180 + .../crates/serde_urlencoded-0.7.1/BUILD.bazel | 88 + .../crates/sharded-slab-0.1.4/BUILD.bazel | 85 + .../signal-hook-registry-1.4.0/BUILD.bazel | 85 + .../crates/slab-0.4.5/BUILD.bazel | 86 + .../crates/smallvec-1.8.0/BUILD.bazel | 84 + .../crates/socket2-0.4.4/BUILD.bazel | 119 + .../crates/syn-1.0.86/BUILD.bazel | 196 + .../crates/sync_wrapper-0.1.1/BUILD.bazel | 84 + .../crates/thread_local-1.1.4/BUILD.bazel | 85 + .../crates/tokio-1.16.1/BUILD.bazel | 165 + .../crates/tokio-macros-1.7.0/BUILD.bazel | 87 + .../crates/tokio-util-0.6.9/BUILD.bazel | 92 + .../crates/tokio-util-0.7.0/BUILD.bazel | 90 + .../crates/tower-0.4.12/BUILD.bazel | 106 + .../crates/tower-http-0.2.3/BUILD.bazel | 102 + .../crates/tower-layer-0.3.1/BUILD.bazel | 84 + .../crates/tower-service-0.3.1/BUILD.bazel | 84 + .../crates/tracing-0.1.31/BUILD.bazel | 94 + .../tracing-attributes-0.1.19/BUILD.bazel | 87 + .../crates/tracing-core-0.1.22/BUILD.bazel | 94 + .../crates/tracing-log-0.1.2/BUILD.bazel | 89 + .../tracing-subscriber-0.3.9/BUILD.bazel | 101 + .../crates/try-lock-0.2.3/BUILD.bazel | 84 + .../crates/unicode-xid-0.2.2/BUILD.bazel | 85 + .../crates/valuable-0.1.0/BUILD.bazel | 175 + .../crates/want-0.3.0/BUILD.bazel | 86 + .../crates/winapi-0.3.9/BUILD.bazel | 241 + .../BUILD.bazel | 171 + .../BUILD.bazel | 171 + .../vendor_local_pkgs/src/main.rs | 150 + .../vendor_remote_manifests/BUILD.bazel | 24 + .../vendor_remote_manifests/Cargo.lock | 408 + .../vendor_remote_manifests/Cargo.toml | 12 + .../crates/BUILD.async-stream-0.3.2.bazel | 86 + .../BUILD.async-stream-impl-0.3.2.bazel | 87 + .../crates/BUILD.bazel | 47 + .../crates/BUILD.bitflags-1.3.2.bazel | 85 + .../crates/BUILD.bytes-1.1.0.bazel | 86 + .../crates/BUILD.cfg-if-1.0.0.bazel | 84 + .../crates/BUILD.fastrand-1.7.0.bazel | 94 + .../crates/BUILD.futures-core-0.3.21.bazel | 177 + .../crates/BUILD.hermit-abi-0.1.19.bazel | 86 + .../crates/BUILD.instant-0.1.12.bazel | 85 + .../crates/BUILD.libc-0.2.119.bazel | 175 + .../crates/BUILD.lock_api-0.4.6.bazel | 85 + .../crates/BUILD.log-0.4.14.bazel | 172 + .../crates/BUILD.memchr-2.4.1.bazel | 175 + .../crates/BUILD.mio-0.8.0.bazel | 128 + .../crates/BUILD.miow-0.3.7.bazel | 85 + .../crates/BUILD.ntapi-0.3.7.bazel | 176 + .../crates/BUILD.num_cpus-1.13.1.bazel | 116 + .../crates/BUILD.once_cell-1.9.0.bazel | 88 + .../crates/BUILD.parking_lot-0.12.0.bazel | 87 + .../crates/BUILD.parking_lot_core-0.9.1.bazel | 219 + .../crates/BUILD.pin-project-lite-0.2.8.bazel | 84 + .../crates/BUILD.proc-macro2-1.0.36.bazel | 176 + .../crates/BUILD.quote-1.0.15.bazel | 87 + .../crates/BUILD.redox_syscall-0.2.11.bazel | 85 + .../crates/BUILD.remove_dir_all-0.5.3.bazel | 94 + .../crates/BUILD.scopeguard-1.1.0.bazel | 84 + .../BUILD.signal-hook-registry-1.4.0.bazel | 85 + .../crates/BUILD.smallvec-1.8.0.bazel | 84 + .../crates/BUILD.socket2-0.4.4.bazel | 120 + .../crates/BUILD.syn-1.0.86.bazel | 194 + .../crates/BUILD.tempfile-3.3.0.bazel | 134 + .../crates/BUILD.tokio-1.17.0.bazel | 170 + .../crates/BUILD.tokio-macros-1.7.0.bazel | 87 + .../crates/BUILD.tokio-stream-0.1.8.bazel | 89 + .../crates/BUILD.tokio-test-0.4.2.bazel | 89 + .../crates/BUILD.unicode-xid-0.2.2.bazel | 85 + .../crates/BUILD.winapi-0.3.9.bazel | 233 + ...ILD.winapi-i686-pc-windows-gnu-0.4.0.bazel | 171 + ...D.winapi-x86_64-pc-windows-gnu-0.4.0.bazel | 171 + .../crates/BUILD.windows-sys-0.32.0.bazel | 149 + .../BUILD.windows_aarch64_msvc-0.32.0.bazel | 171 + .../BUILD.windows_i686_gnu-0.32.0.bazel | 171 + .../BUILD.windows_i686_msvc-0.32.0.bazel | 171 + .../BUILD.windows_x86_64_gnu-0.32.0.bazel | 171 + .../BUILD.windows_x86_64_msvc-0.32.0.bazel | 171 + .../vendor_remote_manifests/crates/crates.bzl | 25 + .../vendor_remote_manifests/crates/defs.bzl | 832 ++ .../vendor_remote_manifests/src/lib.rs | 44 + .../vendor_remote_pkgs/BUILD.bazel | 72 + .../crates/BUILD.ansi_term-0.12.1.bazel | 94 + .../crates/BUILD.async-trait-0.1.52.bazel | 174 + .../crates/BUILD.autocfg-1.1.0.bazel | 84 + .../crates/BUILD.axum-0.4.8.bazel | 114 + .../crates/BUILD.axum-core-0.1.2.bazel | 90 + .../vendor_remote_pkgs/crates/BUILD.bazel | 83 + .../crates/BUILD.bitflags-1.3.2.bazel | 85 + .../crates/BUILD.bytes-1.1.0.bazel | 86 + .../crates/BUILD.cfg-if-1.0.0.bazel | 84 + .../crates/BUILD.fnv-1.0.7.bazel | 86 + .../crates/BUILD.form_urlencoded-1.0.1.bazel | 86 + .../crates/BUILD.futures-channel-0.3.21.bazel | 178 + .../crates/BUILD.futures-core-0.3.21.bazel | 177 + .../crates/BUILD.futures-sink-0.3.21.bazel | 87 + .../crates/BUILD.futures-task-0.3.21.bazel | 173 + .../crates/BUILD.futures-util-0.3.21.bazel | 177 + .../crates/BUILD.h2-0.3.11.bazel | 95 + .../crates/BUILD.hashbrown-0.11.2.bazel | 85 + .../crates/BUILD.hermit-abi-0.1.19.bazel | 86 + .../crates/BUILD.http-0.2.6.bazel | 87 + .../crates/BUILD.http-body-0.4.4.bazel | 87 + .../BUILD.http-range-header-0.3.0.bazel | 84 + .../crates/BUILD.httparse-1.6.0.bazel | 175 + .../crates/BUILD.httpdate-1.0.2.bazel | 84 + .../crates/BUILD.hyper-0.14.17.bazel | 111 + .../crates/BUILD.indexmap-1.8.0.bazel | 175 + .../crates/BUILD.instant-0.1.12.bazel | 85 + .../crates/BUILD.itoa-1.0.1.bazel | 84 + .../crates/BUILD.lazy_static-1.4.0.bazel | 84 + .../crates/BUILD.libc-0.2.119.bazel | 175 + .../crates/BUILD.lock_api-0.4.6.bazel | 85 + .../crates/BUILD.log-0.4.14.bazel | 174 + .../crates/BUILD.matches-0.1.9.bazel | 84 + .../crates/BUILD.matchit-0.4.6.bazel | 85 + .../crates/BUILD.memchr-2.4.1.bazel | 175 + .../crates/BUILD.mime-0.3.16.bazel | 84 + .../crates/BUILD.mio-0.7.14.bazel | 132 + .../crates/BUILD.miow-0.3.7.bazel | 85 + .../crates/BUILD.ntapi-0.3.7.bazel | 176 + .../crates/BUILD.num_cpus-1.13.1.bazel | 116 + .../crates/BUILD.once_cell-1.9.0.bazel | 88 + .../crates/BUILD.parking_lot-0.11.2.bazel | 88 + .../crates/BUILD.parking_lot_core-0.8.5.bazel | 222 + .../crates/BUILD.percent-encoding-2.1.0.bazel | 84 + .../crates/BUILD.pin-project-1.0.10.bazel | 85 + .../BUILD.pin-project-internal-1.0.10.bazel | 87 + .../crates/BUILD.pin-project-lite-0.2.8.bazel | 84 + .../crates/BUILD.pin-utils-0.1.0.bazel | 84 + .../crates/BUILD.proc-macro2-1.0.36.bazel | 176 + .../crates/BUILD.quote-1.0.15.bazel | 87 + .../crates/BUILD.redox_syscall-0.2.11.bazel | 85 + .../crates/BUILD.ryu-1.0.9.bazel | 84 + .../crates/BUILD.scopeguard-1.1.0.bazel | 84 + .../crates/BUILD.serde-1.0.136.bazel | 175 + .../crates/BUILD.serde_json-1.0.79.bazel | 180 + .../crates/BUILD.serde_urlencoded-0.7.1.bazel | 88 + .../crates/BUILD.sharded-slab-0.1.4.bazel | 85 + .../BUILD.signal-hook-registry-1.4.0.bazel | 85 + .../crates/BUILD.slab-0.4.5.bazel | 86 + .../crates/BUILD.smallvec-1.8.0.bazel | 84 + .../crates/BUILD.socket2-0.4.4.bazel | 119 + .../crates/BUILD.syn-1.0.86.bazel | 196 + .../crates/BUILD.sync_wrapper-0.1.1.bazel | 84 + .../crates/BUILD.thread_local-1.1.4.bazel | 85 + .../crates/BUILD.tokio-1.16.1.bazel | 165 + .../crates/BUILD.tokio-macros-1.7.0.bazel | 87 + .../crates/BUILD.tokio-util-0.6.9.bazel | 92 + .../crates/BUILD.tokio-util-0.7.0.bazel | 90 + .../crates/BUILD.tower-0.4.12.bazel | 106 + .../crates/BUILD.tower-http-0.2.3.bazel | 102 + .../crates/BUILD.tower-layer-0.3.1.bazel | 84 + .../crates/BUILD.tower-service-0.3.1.bazel | 84 + .../crates/BUILD.tracing-0.1.31.bazel | 94 + .../BUILD.tracing-attributes-0.1.19.bazel | 87 + .../crates/BUILD.tracing-core-0.1.22.bazel | 94 + .../crates/BUILD.tracing-log-0.1.2.bazel | 89 + .../BUILD.tracing-subscriber-0.3.9.bazel | 101 + .../crates/BUILD.try-lock-0.2.3.bazel | 84 + .../crates/BUILD.unicode-xid-0.2.2.bazel | 85 + .../crates/BUILD.valuable-0.1.0.bazel | 175 + .../crates/BUILD.want-0.3.0.bazel | 86 + .../crates/BUILD.winapi-0.3.9.bazel | 241 + ...ILD.winapi-i686-pc-windows-gnu-0.4.0.bazel | 171 + ...D.winapi-x86_64-pc-windows-gnu-0.4.0.bazel | 171 + .../vendor_remote_pkgs/crates/crates.bzl | 25 + .../vendor_remote_pkgs/crates/defs.bzl | 1204 ++ .../vendor_remote_pkgs/src/main.rs | 150 + 659 files changed, 118962 insertions(+), 7668 deletions(-) create mode 100644 crate_universe/3rdparty/BUILD.bazel create mode 100644 crate_universe/3rdparty/BUILD.libgit2.bazel create mode 100644 crate_universe/3rdparty/BUILD.zlib.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.aho-corasick-0.7.18.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.anyhow-1.0.55.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.atty-0.2.14.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.block-buffer-0.7.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.block-padding-0.1.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.bstr-0.2.17.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.byte-tools-0.3.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.byteorder-1.4.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.camino-1.0.7.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cargo-lock-7.0.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.14.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cargo_toml-0.11.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cc-1.0.73.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cfg-expr-0.10.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.chrono-0.4.19.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.chrono-tz-0.6.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.0.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.clap-3.1.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.clap_derive-3.1.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.crates-index-0.18.7.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.7.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.digest-0.10.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.digest-0.8.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.fake-simd-0.1.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.fastrand-1.7.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.0.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.generic-array-0.12.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.generic-array-0.14.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.getrandom-0.2.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.git2-0.14.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.globset-0.4.8.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.hashbrown-0.11.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.heck-0.4.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.hermit-abi-0.1.19.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.home-0.5.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.humansize-1.1.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.idna-0.2.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.indexmap-1.8.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.instant-0.1.12.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.itoa-1.0.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.jobserver-0.1.24.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.libc-0.2.119.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.libgit2-sys-0.13.1+1.4.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.libz-sys-1.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.log-0.4.14.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.matches-0.1.9.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.memchr-2.4.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-integer-0.1.44.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-iter-0.1.42.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num-traits-0.2.14.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.num_cpus-1.13.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.once_cell-1.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.opaque-debug-0.2.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.os_str_bytes-6.0.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.percent-encoding-2.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pest-2.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pest_derive-2.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pest_generator-2.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pest_meta-2.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.phf-0.10.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.phf_codegen-0.10.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.phf_generator-0.10.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.phf_shared-0.10.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.pkg-config-0.3.24.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.16.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.proc-macro-error-1.0.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.proc-macro-error-attr-1.0.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.36.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.quote-1.0.15.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rand_core-0.6.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.redox_syscall-0.2.11.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.regex-1.5.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.regex-syntax-0.6.25.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.remove_dir_all-0.5.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.ryu-1.0.9.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.semver-1.0.6.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.serde-1.0.136.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.136.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.serde_json-1.0.79.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.sha-1-0.8.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.sha2-0.10.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.siphasher-0.3.9.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.smallvec-1.8.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.smartstring-1.0.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.static_assertions-1.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.syn-1.0.86.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.tempfile-3.3.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.tera-1.15.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.termcolor-1.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.textwrap-0.14.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.textwrap-0.15.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.tinyvec-1.5.1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.toml-0.5.8.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.typenum-1.15.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.3.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.uncased-0.9.6.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.7.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.19.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.unicode-xid-0.2.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.url-2.2.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.vcpkg-0.2.15.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.walkdir-2.3.2.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel create mode 100644 crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel create mode 100644 crate_universe/3rdparty/crates/crates.bzl create mode 100644 crate_universe/3rdparty/crates/defs.bzl create mode 100644 crate_universe/3rdparty/third_party_deps.bzl delete mode 100644 crate_universe/CONTRIBUTING.md create mode 100644 crate_universe/Cargo.Bazel.lock delete mode 100644 crate_universe/Cross.toml delete mode 100644 crate_universe/bootstrap.bzl create mode 100644 crate_universe/crates.bzl create mode 100644 crate_universe/crates_deps.bzl create mode 100644 crate_universe/deps_bootstrap.bzl delete mode 100644 crate_universe/private/bootstrap/.bazelversion delete mode 100644 crate_universe/private/bootstrap/.gitignore delete mode 100644 crate_universe/private/bootstrap/BUILD.bazel delete mode 100644 crate_universe/private/bootstrap/README.md delete mode 100644 crate_universe/private/bootstrap/WORKSPACE.bazel delete mode 100755 crate_universe/private/bootstrap/build.sh delete mode 100755 crate_universe/private/bootstrap/install.sh create mode 100644 crate_universe/private/bootstrap_utils.bzl create mode 100644 crate_universe/private/common_utils.bzl create mode 100644 crate_universe/private/crate.bzl create mode 100644 crate_universe/private/crates_repository.bzl create mode 100644 crate_universe/private/crates_vendor.bzl delete mode 100644 crate_universe/private/defaults.bzl delete mode 100644 crate_universe/private/defaults.bzl.template create mode 100644 crate_universe/private/generate_utils.bzl create mode 100644 crate_universe/private/selects.bzl create mode 100644 crate_universe/private/splicing_utils.bzl create mode 100644 crate_universe/private/srcs.bzl create mode 100644 crate_universe/private/test/BUILD.bazel create mode 100644 crate_universe/private/urls.bzl delete mode 100644 crate_universe/private/util.bzl create mode 100644 crate_universe/private/vendor/BUILD.bazel create mode 100644 crate_universe/private/vendor_utils.bzl create mode 100644 crate_universe/src/cli.rs create mode 100644 crate_universe/src/cli/generate.rs create mode 100644 crate_universe/src/cli/query.rs create mode 100644 crate_universe/src/cli/splice.rs create mode 100644 crate_universe/src/cli/vendor.rs delete mode 100644 crate_universe/src/consolidator.rs create mode 100644 crate_universe/src/context.rs create mode 100644 crate_universe/src/context/crate_context.rs create mode 100644 crate_universe/src/context/platforms.rs create mode 100644 crate_universe/src/lockfile.rs create mode 100644 crate_universe/src/metadata.rs create mode 100644 crate_universe/src/metadata/dependency.rs create mode 100644 crate_universe/src/metadata/metadata_annotation.rs delete mode 100644 crate_universe/src/parser.rs delete mode 100644 crate_universe/src/renderer.rs create mode 100644 crate_universe/src/rendering.rs create mode 100644 crate_universe/src/rendering/template_engine.rs create mode 100644 crate_universe/src/rendering/templates/crate_build_file.j2 create mode 100644 crate_universe/src/rendering/templates/module_build_file.j2 create mode 100644 crate_universe/src/rendering/templates/module_bzl.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/aliases.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/binary.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/build_script.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/common_attrs.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/deps.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/library.j2 create mode 100644 crate_universe/src/rendering/templates/partials/crate/proc_macro.j2 create mode 100644 crate_universe/src/rendering/templates/partials/header.j2 create mode 100644 crate_universe/src/rendering/templates/partials/module/aliases_map.j2 create mode 100644 crate_universe/src/rendering/templates/partials/module/deps_map.j2 create mode 100644 crate_universe/src/rendering/templates/partials/module/repo_git.j2 create mode 100644 crate_universe/src/rendering/templates/partials/module/repo_http.j2 create mode 100644 crate_universe/src/rendering/templates/partials/starlark/glob.j2 create mode 100644 crate_universe/src/rendering/templates/partials/starlark/selectable_dict.j2 create mode 100644 crate_universe/src/rendering/templates/partials/starlark/selectable_list.j2 create mode 100644 crate_universe/src/rendering/templates/vendor_module.j2 delete mode 100644 crate_universe/src/resolver.rs delete mode 100644 crate_universe/src/serde_utils.rs create mode 100644 crate_universe/src/splicing.rs create mode 100644 crate_universe/src/splicing/cargo_config.rs create mode 100644 crate_universe/src/splicing/splicer.rs delete mode 100644 crate_universe/src/templates/BUILD.crate.bazel.template delete mode 100644 crate_universe/src/templates/defs.bzl.template delete mode 100644 crate_universe/src/templates/helper_functions.template delete mode 100644 crate_universe/src/templates/partials/build_script.template delete mode 100644 crate_universe/src/templates/partials/common_attrs.template delete mode 100644 crate_universe/src/templates/partials/default_data_dependencies.template delete mode 100644 crate_universe/src/templates/partials/git_repository.template delete mode 100644 crate_universe/src/templates/partials/http_archive.template delete mode 100644 crate_universe/src/templates/partials/rust_binary.template delete mode 100644 crate_universe/src/templates/partials/rust_library.template delete mode 100644 crate_universe/src/templates/partials/targeted_aliases.template delete mode 100644 crate_universe/src/templates/partials/targeted_build_script_data_dependencies.template delete mode 100644 crate_universe/src/templates/partials/targeted_build_script_dependencies.template delete mode 100644 crate_universe/src/templates/partials/targeted_data_dependencies.template delete mode 100644 crate_universe/src/templates/partials/targeted_dependencies.template create mode 100644 crate_universe/src/test.rs delete mode 100644 crate_universe/src/testing.rs create mode 100644 crate_universe/src/utils.rs create mode 100644 crate_universe/src/utils/starlark.rs create mode 100644 crate_universe/src/utils/starlark/glob.rs create mode 100644 crate_universe/src/utils/starlark/label.rs create mode 100644 crate_universe/src/utils/starlark/select.rs create mode 100644 crate_universe/test_data/metadata/aliases/Cargo.lock create mode 100644 crate_universe/test_data/metadata/aliases/Cargo.toml create mode 100644 crate_universe/test_data/metadata/aliases/metadata.json create mode 100644 crate_universe/test_data/metadata/build_scripts/Cargo.lock create mode 100644 crate_universe/test_data/metadata/build_scripts/Cargo.toml create mode 100644 crate_universe/test_data/metadata/build_scripts/metadata.json create mode 100644 crate_universe/test_data/metadata/common/Cargo.lock create mode 100644 crate_universe/test_data/metadata/common/Cargo.toml create mode 100644 crate_universe/test_data/metadata/common/metadata.json create mode 100644 crate_universe/test_data/metadata/crate_types/Cargo.lock create mode 100644 crate_universe/test_data/metadata/crate_types/Cargo.toml create mode 100644 crate_universe/test_data/metadata/crate_types/metadata.json create mode 100644 crate_universe/test_data/metadata/git_repos/Cargo.lock create mode 100644 crate_universe/test_data/metadata/git_repos/Cargo.toml create mode 100644 crate_universe/test_data/metadata/git_repos/metadata.json create mode 100644 crate_universe/test_data/metadata/multi_cfg_dep/Cargo.lock create mode 100644 crate_universe/test_data/metadata/multi_cfg_dep/Cargo.toml create mode 100644 crate_universe/test_data/metadata/multi_cfg_dep/metadata.json create mode 100644 crate_universe/test_data/metadata/no_deps/Cargo.lock create mode 100644 crate_universe/test_data/metadata/no_deps/Cargo.toml create mode 100644 crate_universe/test_data/metadata/no_deps/metadata.json create mode 100644 crate_universe/test_data/private/BUILD.bazel create mode 100755 crate_universe/test_data/private/metadata_generator.py delete mode 100644 crate_universe/tests/parser.rs delete mode 100644 crate_universe/third_party/openssl/BUILD.bazel delete mode 100644 crate_universe/third_party/openssl/openssl_repositories.bzl create mode 100644 crate_universe/tools/BUILD.bazel create mode 100644 crate_universe/tools/cross_installer/BUILD.bazel create mode 100644 crate_universe/tools/cross_installer/Cargo.toml create mode 100644 crate_universe/tools/cross_installer/Cross.toml create mode 100644 crate_universe/tools/cross_installer/cross_installer_deps.bzl create mode 100644 crate_universe/tools/cross_installer/src/main.rs create mode 100644 crate_universe/tools/urls_generator/BUILD.bazel create mode 100644 crate_universe/tools/urls_generator/Cargo.toml create mode 100644 crate_universe/tools/urls_generator/src/main.rs create mode 100644 crate_universe/version.bzl delete mode 100644 docs/crate_universe.vm delete mode 100644 examples/crate_universe/basic/BUILD.bazel delete mode 100644 examples/crate_universe/basic/src/main.rs delete mode 100755 examples/crate_universe/basic/test.sh delete mode 100644 examples/crate_universe/basic/workspace.bzl create mode 100644 examples/crate_universe/cargo_aliases/.bazelrc create mode 100644 examples/crate_universe/cargo_aliases/BUILD.bazel create mode 100644 examples/crate_universe/cargo_aliases/Cargo.Bazel.lock create mode 100644 examples/crate_universe/cargo_aliases/Cargo.lock create mode 100644 examples/crate_universe/cargo_aliases/Cargo.toml create mode 100644 examples/crate_universe/cargo_aliases/src/lib.rs create mode 100644 examples/crate_universe/cargo_local/BUILD.bazel create mode 100644 examples/crate_universe/cargo_local/Cargo.lock create mode 100644 examples/crate_universe/cargo_local/Cargo.toml create mode 100644 examples/crate_universe/cargo_local/src/lib.rs create mode 100644 examples/crate_universe/cargo_remote/.bazelrc create mode 100644 examples/crate_universe/cargo_remote/BUILD.bazel create mode 100644 examples/crate_universe/cargo_remote/BUILD.names.bazel create mode 100644 examples/crate_universe/cargo_remote/remote_crate_test.rs create mode 100644 examples/crate_universe/cargo_workspace/.bazelrc create mode 100644 examples/crate_universe/cargo_workspace/BUILD.bazel create mode 100644 examples/crate_universe/cargo_workspace/Cargo.Bazel.lock create mode 100644 examples/crate_universe/cargo_workspace/Cargo.toml create mode 100644 examples/crate_universe/cargo_workspace/num_printer/BUILD.bazel create mode 100644 examples/crate_universe/cargo_workspace/num_printer/Cargo.toml create mode 100644 examples/crate_universe/cargo_workspace/num_printer/src/main.rs create mode 100644 examples/crate_universe/cargo_workspace/printer/BUILD.bazel create mode 100644 examples/crate_universe/cargo_workspace/printer/Cargo.toml create mode 100644 examples/crate_universe/cargo_workspace/printer/src/lib.rs create mode 100644 examples/crate_universe/cargo_workspace/rng/BUILD.bazel create mode 100644 examples/crate_universe/cargo_workspace/rng/Cargo.toml create mode 100644 examples/crate_universe/cargo_workspace/rng/src/lib.rs create mode 100644 examples/crate_universe/extra_workspace_members/.bazelrc create mode 100644 examples/crate_universe/extra_workspace_members/BUILD.bazel create mode 100644 examples/crate_universe/extra_workspace_members/Cargo.Bazel.lock create mode 100644 examples/crate_universe/extra_workspace_members/Cargo.toml create mode 100644 examples/crate_universe/extra_workspace_members/src/main.rs delete mode 100644 examples/crate_universe/has_aliased_deps/BUILD.bazel delete mode 100644 examples/crate_universe/has_aliased_deps/Cargo.lock delete mode 100644 examples/crate_universe/has_aliased_deps/Cargo.toml delete mode 100644 examples/crate_universe/has_aliased_deps/src/bin.rs delete mode 100755 examples/crate_universe/has_aliased_deps/test.sh delete mode 100644 examples/crate_universe/has_aliased_deps/workspace.bzl create mode 100644 examples/crate_universe/multi_package/.bazelrc create mode 100644 examples/crate_universe/multi_package/3rdparty/BUILD.bazel create mode 100644 examples/crate_universe/multi_package/3rdparty/BUILD.curl.bazel create mode 100644 examples/crate_universe/multi_package/3rdparty/BUILD.libssh2.bazel rename {crate_universe/third_party/openssl => examples/crate_universe/multi_package/3rdparty}/BUILD.nasm.bazel (61%) rename {crate_universe/third_party/openssl => examples/crate_universe/multi_package/3rdparty}/BUILD.openssl.bazel (79%) rename {crate_universe/third_party/openssl => examples/crate_universe/multi_package/3rdparty}/BUILD.perl.bazel (62%) create mode 100644 examples/crate_universe/multi_package/3rdparty/third_party_deps.bzl create mode 100644 examples/crate_universe/multi_package/BUILD.bazel create mode 100644 examples/crate_universe/multi_package/Cargo.Bazel.lock create mode 100644 examples/crate_universe/multi_package/pkg_a/BUILD.bazel create mode 100644 examples/crate_universe/multi_package/pkg_a/Cargo.lock create mode 100644 examples/crate_universe/multi_package/pkg_a/Cargo.toml create mode 100644 examples/crate_universe/multi_package/pkg_a/src/lib.rs create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_b/BUILD.bazel create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_b/Cargo.lock rename examples/crate_universe/{uses_proc_macro => multi_package/sub_pkgs/pkg_b}/Cargo.toml (60%) create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_b/src/lib.rs create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_c/BUILD.bazel create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_c/Cargo.lock create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_c/Cargo.toml create mode 100644 examples/crate_universe/multi_package/sub_pkgs/pkg_c/src/lib.rs create mode 100644 examples/crate_universe/no_cargo_manifests/.bazelrc create mode 100644 examples/crate_universe/no_cargo_manifests/BUILD.bazel create mode 100644 examples/crate_universe/no_cargo_manifests/Cargo.Bazel.lock create mode 100644 examples/crate_universe/no_cargo_manifests/src/main.rs delete mode 100644 examples/crate_universe/uses_proc_macro/BUILD.bazel delete mode 100644 examples/crate_universe/uses_proc_macro/Cargo.lock delete mode 100644 examples/crate_universe/uses_proc_macro/src/main.rs delete mode 100755 examples/crate_universe/uses_proc_macro/test.sh delete mode 100644 examples/crate_universe/uses_proc_macro/workspace.bzl delete mode 100644 examples/crate_universe/uses_sys_crate/BUILD.bazel delete mode 100644 examples/crate_universe/uses_sys_crate/Cargo.lock delete mode 100644 examples/crate_universe/uses_sys_crate/Cargo.toml delete mode 100644 examples/crate_universe/uses_sys_crate/src/main.rs delete mode 100755 examples/crate_universe/uses_sys_crate/test.sh delete mode 100644 examples/crate_universe/uses_sys_crate/workspace.bzl create mode 100644 examples/crate_universe/vendor_local_manifests/.gitignore create mode 100644 examples/crate_universe/vendor_local_manifests/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/Cargo.lock create mode 100644 examples/crate_universe/vendor_local_manifests/Cargo.toml create mode 100644 examples/crate_universe/vendor_local_manifests/crates/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/async-stream-0.3.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/async-stream-impl-0.3.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/bitflags-1.3.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/bytes-1.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/cfg-if-1.0.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/defs.bzl create mode 100644 examples/crate_universe/vendor_local_manifests/crates/fastrand-1.7.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/futures-core-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/hermit-abi-0.1.19/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/instant-0.1.12/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/libc-0.2.119/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/lock_api-0.4.6/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/log-0.4.14/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/memchr-2.4.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/mio-0.7.14/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/miow-0.3.7/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/ntapi-0.3.7/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/num_cpus-1.13.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/once_cell-1.9.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/parking_lot-0.11.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/parking_lot_core-0.8.5/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/pin-project-lite-0.2.8/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/proc-macro2-1.0.36/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/quote-1.0.15/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/redox_syscall-0.2.11/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/remove_dir_all-0.5.3/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/scopeguard-1.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/signal-hook-registry-1.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/smallvec-1.8.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/syn-1.0.86/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/tempfile-3.3.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/tokio-1.16.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/tokio-macros-1.7.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/tokio-stream-0.1.8/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/tokio-test-0.4.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/unicode-xid-0.2.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/winapi-0.3.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/winapi-i686-pc-windows-gnu-0.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/crates/winapi-x86_64-pc-windows-gnu-0.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_manifests/src/lib.rs create mode 100644 examples/crate_universe/vendor_local_pkgs/.gitignore create mode 100644 examples/crate_universe/vendor_local_pkgs/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/ansi_term-0.12.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/async-trait-0.1.52/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/autocfg-1.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/axum-0.4.8/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/axum-core-0.1.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/bitflags-1.3.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/bytes-1.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/cfg-if-1.0.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/defs.bzl create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/fnv-1.0.7/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/form_urlencoded-1.0.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/futures-channel-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/futures-core-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/futures-sink-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/futures-task-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/futures-util-0.3.21/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/h2-0.3.11/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/hashbrown-0.11.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/hermit-abi-0.1.19/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/http-0.2.6/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/http-body-0.4.4/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/http-range-header-0.3.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/httparse-1.6.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/httpdate-1.0.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/hyper-0.14.17/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/indexmap-1.8.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/instant-0.1.12/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/itoa-1.0.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/lazy_static-1.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/libc-0.2.119/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/lock_api-0.4.6/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/log-0.4.14/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/matches-0.1.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/matchit-0.4.6/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/memchr-2.4.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/mime-0.3.16/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/mio-0.7.14/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/miow-0.3.7/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/ntapi-0.3.7/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/num_cpus-1.13.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/once_cell-1.9.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/parking_lot-0.11.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/parking_lot_core-0.8.5/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/percent-encoding-2.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/pin-project-1.0.10/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/pin-project-internal-1.0.10/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/pin-project-lite-0.2.8/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/pin-utils-0.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/proc-macro2-1.0.36/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/quote-1.0.15/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/redox_syscall-0.2.11/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/ryu-1.0.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/scopeguard-1.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/serde-1.0.136/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/serde_json-1.0.79/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/serde_urlencoded-0.7.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/sharded-slab-0.1.4/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/signal-hook-registry-1.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/slab-0.4.5/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/smallvec-1.8.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/socket2-0.4.4/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/syn-1.0.86/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/sync_wrapper-0.1.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/thread_local-1.1.4/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tokio-1.16.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tokio-macros-1.7.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tokio-util-0.6.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tokio-util-0.7.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tower-0.4.12/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tower-http-0.2.3/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tower-layer-0.3.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tower-service-0.3.1/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tracing-0.1.31/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tracing-attributes-0.1.19/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tracing-core-0.1.22/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tracing-log-0.1.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/tracing-subscriber-0.3.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/try-lock-0.2.3/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/unicode-xid-0.2.2/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/valuable-0.1.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/want-0.3.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/winapi-0.3.9/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/winapi-i686-pc-windows-gnu-0.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/crates/winapi-x86_64-pc-windows-gnu-0.4.0/BUILD.bazel create mode 100644 examples/crate_universe/vendor_local_pkgs/src/main.rs create mode 100644 examples/crate_universe/vendor_remote_manifests/BUILD.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/Cargo.lock create mode 100644 examples/crate_universe/vendor_remote_manifests/Cargo.toml create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.async-stream-0.3.2.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.async-stream-impl-0.3.2.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.bitflags-1.3.2.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.bytes-1.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.cfg-if-1.0.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.fastrand-1.7.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.futures-core-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.hermit-abi-0.1.19.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.instant-0.1.12.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.libc-0.2.119.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.lock_api-0.4.6.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.log-0.4.14.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.memchr-2.4.1.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.mio-0.8.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.miow-0.3.7.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.ntapi-0.3.7.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.num_cpus-1.13.1.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.once_cell-1.9.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.parking_lot-0.12.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.parking_lot_core-0.9.1.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.pin-project-lite-0.2.8.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.proc-macro2-1.0.36.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.quote-1.0.15.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.redox_syscall-0.2.11.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.remove_dir_all-0.5.3.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.scopeguard-1.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.signal-hook-registry-1.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.smallvec-1.8.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.socket2-0.4.4.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.syn-1.0.86.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.tempfile-3.3.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.tokio-1.17.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.tokio-macros-1.7.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.tokio-stream-0.1.8.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.tokio-test-0.4.2.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.unicode-xid-0.2.2.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.winapi-0.3.9.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows-sys-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows_aarch64_msvc-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows_i686_gnu-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows_i686_msvc-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows_x86_64_gnu-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/BUILD.windows_x86_64_msvc-0.32.0.bazel create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/crates.bzl create mode 100644 examples/crate_universe/vendor_remote_manifests/crates/defs.bzl create mode 100644 examples/crate_universe/vendor_remote_manifests/src/lib.rs create mode 100644 examples/crate_universe/vendor_remote_pkgs/BUILD.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.ansi_term-0.12.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.async-trait-0.1.52.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.autocfg-1.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.axum-0.4.8.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.axum-core-0.1.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.bitflags-1.3.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.bytes-1.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.cfg-if-1.0.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.fnv-1.0.7.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.form_urlencoded-1.0.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.futures-channel-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.futures-core-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.futures-sink-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.futures-task-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.futures-util-0.3.21.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.h2-0.3.11.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.hashbrown-0.11.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.hermit-abi-0.1.19.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.http-0.2.6.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.http-body-0.4.4.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.http-range-header-0.3.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.httparse-1.6.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.httpdate-1.0.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.hyper-0.14.17.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.indexmap-1.8.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.instant-0.1.12.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.itoa-1.0.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.lazy_static-1.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.libc-0.2.119.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.lock_api-0.4.6.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.log-0.4.14.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.matches-0.1.9.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.matchit-0.4.6.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.memchr-2.4.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.mime-0.3.16.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.mio-0.7.14.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.miow-0.3.7.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.ntapi-0.3.7.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.num_cpus-1.13.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.once_cell-1.9.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.parking_lot-0.11.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.parking_lot_core-0.8.5.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.percent-encoding-2.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.pin-project-1.0.10.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.pin-project-internal-1.0.10.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.pin-project-lite-0.2.8.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.pin-utils-0.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.proc-macro2-1.0.36.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.quote-1.0.15.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.redox_syscall-0.2.11.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.ryu-1.0.9.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.scopeguard-1.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.serde-1.0.136.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.serde_json-1.0.79.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.serde_urlencoded-0.7.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.sharded-slab-0.1.4.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.signal-hook-registry-1.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.slab-0.4.5.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.smallvec-1.8.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.socket2-0.4.4.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.syn-1.0.86.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.sync_wrapper-0.1.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.thread_local-1.1.4.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tokio-1.16.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tokio-macros-1.7.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tokio-util-0.6.9.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tokio-util-0.7.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tower-0.4.12.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tower-http-0.2.3.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tower-layer-0.3.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tower-service-0.3.1.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tracing-0.1.31.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tracing-attributes-0.1.19.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tracing-core-0.1.22.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tracing-log-0.1.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.tracing-subscriber-0.3.9.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.try-lock-0.2.3.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.unicode-xid-0.2.2.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.valuable-0.1.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.want-0.3.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.winapi-0.3.9.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/crates.bzl create mode 100644 examples/crate_universe/vendor_remote_pkgs/crates/defs.bzl create mode 100644 examples/crate_universe/vendor_remote_pkgs/src/main.rs diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index afe0148fac..1e596287b3 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -15,6 +15,11 @@ default_windows_targets: &default_windows_targets - "-//test/proto/..." - "-//tools/rust_analyzer/..." - "-//test/rustfmt/..." +crate_universe_vendor_example_targets: &crate_universe_vendor_example_targets + - "//vendor_local_manifests:crates_vendor" + - "//vendor_local_pkgs:crates_vendor" + - "//vendor_remote_manifests:crates_vendor_manifests" + - "//vendor_remote_pkgs:crates_vendor_pkgs" tasks: ubuntu2004: build_targets: *default_linux_targets @@ -249,9 +254,8 @@ tasks: crate_universe_examples_ubuntu2004: name: Crate Universe Examples platform: ubuntu2004 - environment: - RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP: true working_directory: examples/crate_universe + run_targets: *crate_universe_vendor_example_targets build_targets: - "//..." test_targets: @@ -260,12 +264,11 @@ tasks: crate_universe_rbe_ubuntu1604: name: Crate Universe Examples platform: rbe_ubuntu1604 - environment: - RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP: true working_directory: examples/crate_universe shell_commands: - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel + run_targets: *crate_universe_vendor_example_targets build_targets: - "//..." test_targets: @@ -274,9 +277,8 @@ tasks: crate_universe_examples_macos: name: Crate Universe Examples platform: macos - environment: - RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP: true working_directory: examples/crate_universe + run_targets: *crate_universe_vendor_example_targets build_targets: - "//..." test_targets: @@ -285,22 +287,16 @@ tasks: crate_universe_examples_windows: name: Crate Universe Examples platform: windows - environment: - RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP: true working_directory: examples/crate_universe - build_flags: - - "--enable_runfiles" # this is not enabled by default on windows and is necessary for the cargo build scripts - - "--config=rustfmt" - - "--config=clippy" - crate_universe_windows_targets: &crate_universe_windows_targets + batch_commands: + - echo startup --windows_enable_symlinks >> user.bazelrc + - echo build --enable_runfiles >> user.bazelrc # this is not enabled by default on windows and is necessary for the cargo build scripts + run_targets: *crate_universe_vendor_example_targets + build_flags: *aspects_flags + build_targets: + - "//..." + test_targets: - "//..." - # TODO: There are windows specific build issues in the generated - # dependencies. This should be fixed and all testing enabled. - - "-//uses_proc_macro/..." - - "-//uses_sys_crate/..." - build_targets: *crate_universe_windows_targets - # TODO: fix test targets in `crate_universe_windows_targets` - test_targets: *crate_universe_windows_targets buildifier: version: latest warnings: "all" diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 4e9475e6fb..9610b09858 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -6,6 +6,10 @@ rules_rust_dependencies() rust_register_toolchains(include_rustc_srcs = True) +load("@rules_rust//crate_universe:crates.bzl", "crate_deps_repository") + +crate_deps_repository(bootstrap = True) + load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories") rust_proto_repositories() diff --git a/crate_universe/3rdparty/BUILD.bazel b/crate_universe/3rdparty/BUILD.bazel new file mode 100644 index 0000000000..1f0b8eea52 --- /dev/null +++ b/crate_universe/3rdparty/BUILD.bazel @@ -0,0 +1,20 @@ +load("//crate_universe:crates.bzl", "crate_deps_target") + +package(default_visibility = ["//visibility:public"]) + +crate_deps_target() + +filegroup( + name = "distro", + srcs = glob([ + "*.bzl", + "*.bazel", + ]) + [ + "//crate_universe/3rdparty/crates:srcs", + ], +) + +filegroup( + name = "bzl_srcs", + srcs = glob(["*.bzl"]), +) diff --git a/crate_universe/3rdparty/BUILD.libgit2.bazel b/crate_universe/3rdparty/BUILD.libgit2.bazel new file mode 100644 index 0000000000..031ee7825d --- /dev/null +++ b/crate_universe/3rdparty/BUILD.libgit2.bazel @@ -0,0 +1,277 @@ +# This BUILD file was written based off of the `build.rs` script for the Rust +# crate `libgit2-sys`. For more details, see the crate's source: +# https://github.com/rust-lang/git2-rs/tree/libgit2-sys-0.13.0/libgit2-sys + +load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") +load("@bazel_skylib//rules:write_file.bzl", "write_file") +load("@rules_cc//cc:defs.bzl", "cc_library") + +[ + config_setting( + name = plat, + constraint_values = ["@platforms//os:{}".format(plat)], + ) + for plat in [ + "macos", + "ios", + "tvos", + "windows", + ] +] + +# env::var("CARGO_FEATURE_SSH").is_ok() +bool_flag( + name = "ssh", + build_setting_default = False, +) + +config_setting( + name = "ssh_setting", + flag_values = {":ssh": "True"}, +) + +# target.contains("apple") +selects.config_setting_group( + name = "apple", + match_any = [ + ":macos", + ":ios", + ":tvos", + ], +) + +[ + config_setting( + name = "cpu_" + cpu, + constraint_values = ["@platforms//cpu:{}".format(cpu)], + ) + for cpu in [ + "i386", + "x86_32", + ] +] + +# env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() == "32" +selects.config_setting_group( + name = "pointer_width_32", + match_any = [ + "cpu_i386", + "cpu_x86_32", + ], +) + +# env::var("CARGO_FEATURE_HTTPS").is_ok() +bool_flag( + name = "https", + build_setting_default = False, +) + +config_setting( + name = "https_setting", + flag_values = {":https": "True"}, +) + +# if https && target.contains("windows") +selects.config_setting_group( + name = "https_windows", + match_all = [ + ":https_setting", + ":windows", + ], +) + +# if https && target.contains("apple") +selects.config_setting_group( + name = "https_apple", + match_all = [ + ":https_setting", + ":apple", + ], +) + +cc_library( + name = "http-parser", + srcs = glob(["deps/http-parser/*.c"]), + hdrs = glob(["deps/http-parser/*.h"]), + copts = select({ + # Required in `opt` builds to solve the following error + # libpcre.a(pcre_compile.o): requires unsupported dynamic reloc 11; recompile with -fPIC + "@platforms//os:linux": ["-fPIC"], + "//conditions:default": [], + }), + includes = ["deps/http-parser"], + linkstatic = True, +) + +cc_library( + name = "pcre", + srcs = glob(["deps/pcre/**/*.c"]), + hdrs = glob(["deps/pcre/**/*.h"]), + copts = select({ + # Required in `opt` builds to solve the following error + # libhttp-parser.a(http_parser.o): requires unsupported dynamic reloc 11; recompile with -fPIC + "@platforms//os:linux": ["-fPIC"], + "//conditions:default": [], + }), + defines = [ + "HAVE_STDINT_H=1", + "HAVE_MEMMOVE=1", + "NO_RECURSE=1", + "NEWLINE=10", + "POSIX_MALLOC_THRESHOLD=10", + "LINK_SIZE=2", + "PARENS_NEST_LIMIT=250", + "MATCH_LIMIT=10000000", + "MATCH_LIMIT_RECURSION=MATCH_LIMIT", + "MAX_NAME_SIZE=32", + "MAX_NAME_COUNT=10000", + ], + includes = ["deps/pcre"], + linkstatic = True, +) + +write_file( + name = "configure_features", + out = "include/git2/sys/features.h", + content = [ + "#ifndef INCLUDE_features_h", + "#define INCLUDE_features_h", + "#define GIT_THREADS 1", + "#define GIT_TRACE 1", + ] + + # !target.contains("android") + select({ + "@platforms//os:android": [], + "//conditions:default": ["#define GIT_USE_NSEC 1"], + }) + select({ + ":apple": ["#define GIT_USE_STAT_MTIMESPEC 1"], + "//conditions:default": ["#define GIT_USE_STAT_MTIM 1"], + }) + select({ + ":pointer_width_32": ["#define GIT_ARCH_32 1"], + "//conditions:default": ["#define GIT_ARCH_64 1"], + }) + [ + "#define GIT_SHA1_COLLISIONDETECT 1", + ] + select({ + ":ssh_setting": ["#define GIT_SSH 1"], + "//conditions:default": [], + }) + select({ + ":https_apple": [ + "#define GIT_HTTPS 1", + "#define GIT_SECURE_TRANSPORT 1", + ], + ":https_setting": [ + "#define GIT_HTTPS 1", + "#define GIT_OPENSSL 1", + ], + # target.contains("windows") + ":https_windows": [ + "#define GIT_HTTPS 1", + "#define GIT_WINHTTP 1", + ], + "//conditions:default": [], + }) + select({ + ":apple": ["#define GIT_USE_ICONV 1"], + "//conditions:default": [], + }) + [ + "#endif", + ], +) + +cc_library( + name = "git2", + srcs = glob( + include = [ + "src/*.c", + "src/*.h", + "src/xdiff/*.h", + "src/xdiff/*.c", + "src/transports/*.h", + "src/transports/*.c", + "src/streams/*.h", + "src/streams/*.c", + "src/hash/*.h", + "src/hash/*.c", + ], + exclude = [ + "src/win32/**", + "src/unix/**", + ], + ) + select({ + "@platforms//os:windows": glob([ + "src/win32/**/*.h", + "src/win32/**/*.c", + ]), + "//conditions:default": glob([ + "src/unix/**/*.h", + "src/unix/**/*.c", + ]), + }) + [ + "src/allocators/failalloc.c", + "src/allocators/failalloc.h", + "src/allocators/stdalloc.c", + "src/allocators/stdalloc.h", + "src/allocators/win32_leakcheck.c", + "src/allocators/win32_leakcheck.h", + # Use the CollisionDetection SHA1 implementation. + "src/hash/sha1/collisiondetect.h", + "src/hash/sha1/collisiondetect.c", + "src/hash/sha1/sha1dc/sha1.h", + "src/hash/sha1/sha1dc/sha1.c", + "src/hash/sha1/sha1dc/ubc_check.h", + "src/hash/sha1/sha1dc/ubc_check.c", + ], + hdrs = glob(["include/**/*.h"]) + [ + ":configure_features", + ], + copts = select({ + "@platforms//os:linux": [ + "-fvisibility=hidden", + "-fPIC", + "-Wall", + "-std=gnu90", + # On linux, optimization is required to avoid issues with missing (and unused) symbols: + # `liblibgit2.a(pack.pic.o):pack.c:function packfile_open_locked: error: undefined reference to 'fstat'` + # + # Always enabling optimization helps us avoid this though, it does seem unnecessary and this should + # probably be fixed. + "-O3", + ], + "@platforms//os:windows": [], + "//conditions:default": [ + "-fvisibility=hidden", + "-fPIC", + "-Wall", + "-std=gnu90", + ], + }), + defines = [ + # Use the CollisionDetection SHA1 implementation. + "SHA1DC_NO_STANDARD_INCLUDES=1", + "SHA1DC_CUSTOM_INCLUDE_SHA1_C=\\\"common.h\\\"", + "SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\\\"common.h\\\"", + # Use the included PCRE regex backend. + "GIT_REGEX_BUILTIN=1", + ] + select({ + ":windows": ["STRSAFE_NO_DEPRECATE"], + "//conditions:default": [], + }), + includes = [ + "include", + "src", + ], + linkstatic = True, + strip_include_prefix = "include", + visibility = ["//visibility:public"], + deps = [ + ":http-parser", + ":pcre", + "@zlib", + ], +) + +alias( + name = "libgit2", + actual = ":git2", + visibility = ["//visibility:public"], +) diff --git a/crate_universe/3rdparty/BUILD.zlib.bazel b/crate_universe/3rdparty/BUILD.zlib.bazel new file mode 100644 index 0000000000..dbf8452e94 --- /dev/null +++ b/crate_universe/3rdparty/BUILD.zlib.bazel @@ -0,0 +1,25 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library( + name = "zlib", + srcs = glob(["*.c"]), + hdrs = glob(["*.h"]), + # Use -Dverbose=-1 to turn off zlib's trace logging. + # https://github.com/bazelbuild/bazel/issues/3280 + copts = select({ + "@platforms//os:linux": [ + "-w", + "-Dverbose=-1", + # Required for opt builds to avoid + # `libzlib.a(crc32.o): requires unsupported dynamic reloc 11; recompile with -fPIC` + "-fPIC", + ], + "//conditions:default": [ + "-w", + "-Dverbose=-1", + ], + }), + includes = ["."], + linkstatic = True, + visibility = ["//visibility:public"], +) diff --git a/crate_universe/3rdparty/crates/BUILD.aho-corasick-0.7.18.bazel b/crate_universe/3rdparty/crates/BUILD.aho-corasick-0.7.18.bazel new file mode 100644 index 0000000000..461d2acdaf --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.aho-corasick-0.7.18.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "aho_corasick", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.7.18", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__memchr-2.4.1//:memchr", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.55.bazel b/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.55.bazel new file mode 100644 index 0000000000..862e2f4cdb --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.anyhow-1.0.55.bazel @@ -0,0 +1,175 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "anyhow", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.55", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__anyhow-1.0.55//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "anyhow_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.55", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "anyhow_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.atty-0.2.14.bazel b/crate_universe/3rdparty/crates/BUILD.atty-0.2.14.bazel new file mode 100644 index 0000000000..da6f0b6c97 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.atty-0.2.14.bazel @@ -0,0 +1,124 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "atty", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.14", + deps = [ + ] + select_with_or({ + # cfg(target_os = "hermit") + # + # No supported platform triples for cfg: 'cfg(target_os = "hermit")' + # Skipped dependencies: [{"id":"hermit-abi 0.1.19","target":"hermit_abi"}] + # + # cfg(unix) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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-linux-android", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel new file mode 100644 index 0000000000..bd2fcd98ad --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.autocfg-1.1.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "autocfg", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.bazel b/crate_universe/3rdparty/crates/BUILD.bazel new file mode 100644 index 0000000000..4f6b676598 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.bazel @@ -0,0 +1,166 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +exports_files( + [ + "cargo-bazel.json", + "defs.bzl", + "crates.bzl", + ] + glob([ + "*.bazel", + ]), +) + +filegroup( + name = "srcs", + srcs = glob([ + "*.bazel", + "*.bzl", + ]), +) + +# Workspace Member Dependencies +alias( + name = "anyhow", + actual = "@crate_index__anyhow-1.0.55//:anyhow", + tags = ["manual"], +) + +alias( + name = "cargo-lock", + actual = "@crate_index__cargo-lock-7.0.1//:cargo_lock", + tags = ["manual"], +) + +alias( + name = "cargo-platform", + actual = "@crate_index__cargo-platform-0.1.2//:cargo_platform", + tags = ["manual"], +) + +alias( + name = "cargo_metadata", + actual = "@crate_index__cargo_metadata-0.14.2//:cargo_metadata", + tags = ["manual"], +) + +alias( + name = "cargo_toml", + actual = "@crate_index__cargo_toml-0.11.4//:cargo_toml", + tags = ["manual"], +) + +alias( + name = "cfg-expr", + actual = "@crate_index__cfg-expr-0.10.2//:cfg_expr", + tags = ["manual"], +) + +alias( + name = "clap", + actual = "@crate_index__clap-3.1.5//:clap", + tags = ["manual"], +) + +alias( + name = "crates-index", + actual = "@crate_index__crates-index-0.18.7//:crates_index", + tags = ["manual"], +) + +alias( + name = "hex", + actual = "@crate_index__hex-0.4.3//:hex", + tags = ["manual"], +) + +alias( + name = "pathdiff", + actual = "@crate_index__pathdiff-0.2.1//:pathdiff", + tags = ["manual"], +) + +alias( + name = "regex", + actual = "@crate_index__regex-1.5.4//:regex", + tags = ["manual"], +) + +alias( + name = "semver", + actual = "@crate_index__semver-1.0.6//:semver", + tags = ["manual"], +) + +alias( + name = "serde", + actual = "@crate_index__serde-1.0.136//:serde", + tags = ["manual"], +) + +alias( + name = "serde_json", + actual = "@crate_index__serde_json-1.0.79//:serde_json", + tags = ["manual"], +) + +alias( + name = "sha2", + actual = "@crate_index__sha2-0.10.2//:sha2", + tags = ["manual"], +) + +alias( + name = "spectral", + actual = "@crate_index__spectral-0.6.0//:spectral", + tags = ["manual"], +) + +alias( + name = "tempfile", + actual = "@crate_index__tempfile-3.3.0//:tempfile", + tags = ["manual"], +) + +alias( + name = "tera", + actual = "@crate_index__tera-1.15.0//:tera", + tags = ["manual"], +) + +alias( + name = "textwrap", + actual = "@crate_index__textwrap-0.14.2//:textwrap", + tags = ["manual"], +) + +alias( + name = "toml", + actual = "@crate_index__toml-0.5.8//:toml", + tags = ["manual"], +) + +# Binaries +alias( + name = "cargo-lock__cargo-lock", + actual = "@crate_index__cargo-lock-7.0.1//:cargo-lock__bin", + tags = ["manual"], +) + +alias( + name = "cc__gcc-shim", + actual = "@crate_index__cc-1.0.73//:gcc-shim__bin", + tags = ["manual"], +) + +alias( + name = "phf_generator__gen_hash_test", + actual = "@crate_index__phf_generator-0.10.0//:gen_hash_test__bin", + tags = ["manual"], +) diff --git a/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel new file mode 100644 index 0000000000..68947467bc --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.bitflags-1.3.2.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "bitflags", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.3.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.2.bazel b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.2.bazel new file mode 100644 index 0000000000..59371277df --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.10.2.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "block_buffer", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__generic-array-0.14.5//:generic_array", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.block-buffer-0.7.3.bazel b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.7.3.bazel new file mode 100644 index 0000000000..1bb6977e81 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.block-buffer-0.7.3.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "block_buffer", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.7.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__block-padding-0.1.5//:block_padding", + "@crate_index__byte-tools-0.3.1//:byte_tools", + "@crate_index__byteorder-1.4.3//:byteorder", + "@crate_index__generic-array-0.12.4//:generic_array", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.block-padding-0.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.block-padding-0.1.5.bazel new file mode 100644 index 0000000000..57a82a00d2 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.block-padding-0.1.5.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "block_padding", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.5", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__byte-tools-0.3.1//:byte_tools", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.bstr-0.2.17.bazel b/crate_universe/3rdparty/crates/BUILD.bstr-0.2.17.bazel new file mode 100644 index 0000000000..49bc9e9bef --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.bstr-0.2.17.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "bstr", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.17", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__memchr-2.4.1//:memchr", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.byte-tools-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.byte-tools-0.3.1.bazel new file mode 100644 index 0000000000..c4f77ba34e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.byte-tools-0.3.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "byte_tools", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.byteorder-1.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.byteorder-1.4.3.bazel new file mode 100644 index 0000000000..d08f7c4721 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.byteorder-1.4.3.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense OR MIT +# ]) + +rust_library( + name = "byteorder", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.4.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.camino-1.0.7.bazel b/crate_universe/3rdparty/crates/BUILD.camino-1.0.7.bazel new file mode 100644 index 0000000000..4a616b67db --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.camino-1.0.7.bazel @@ -0,0 +1,176 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "camino", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "serde", + "serde1", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.7", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__camino-1.0.7//:build_script_build", + "@crate_index__serde-1.0.136//:serde", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "camino_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "serde", + "serde1", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.7", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "camino_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.cargo-lock-7.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.cargo-lock-7.0.1.bazel new file mode 100644 index 0000000000..df635c5f71 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cargo-lock-7.0.1.bazel @@ -0,0 +1,154 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "cargo_lock", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "7.0.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__semver-1.0.6//:semver", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__toml-0.5.8//:toml", + "@crate_index__url-2.2.2//:url", + ], + }), +) + +rust_binary( + name = "cargo-lock__bin", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/bin/cargo-lock/main.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "7.0.1", + deps = [ + ":cargo_lock", + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__semver-1.0.6//:semver", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__toml-0.5.8//:toml", + "@crate_index__url-2.2.2//:url", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.2.bazel new file mode 100644 index 0000000000..27eded2c33 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cargo-platform-0.1.2.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "cargo_platform", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:serde", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.14.2.bazel b/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.14.2.bazel new file mode 100644 index 0000000000..025588230e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cargo_metadata-0.14.2.bazel @@ -0,0 +1,90 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "cargo_metadata", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.14.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__camino-1.0.7//:camino", + "@crate_index__cargo-platform-0.1.2//:cargo_platform", + "@crate_index__semver-1.0.6//:semver", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__serde_json-1.0.79//:serde_json", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.11.4.bazel b/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.11.4.bazel new file mode 100644 index 0000000000..3a26aaba1b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cargo_toml-0.11.4.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "cargo_toml", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/cargo_toml.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde_derive-1.0.136//:serde_derive", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.11.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:serde", + "@crate_index__toml-0.5.8//:toml", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cc-1.0.73.bazel b/crate_universe/3rdparty/crates/BUILD.cc-1.0.73.bazel new file mode 100644 index 0000000000..70e055572d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cc-1.0.73.bazel @@ -0,0 +1,152 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "cc", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "jobserver", + "parallel", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.73", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__jobserver-0.1.24//:jobserver", + ], + }), +) + +rust_binary( + name = "gcc-shim__bin", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "jobserver", + "parallel", + ], + crate_root = "src/bin/gcc-shim.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.73", + deps = [ + ":cc", + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__jobserver-0.1.24//:jobserver", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.10.2.bazel b/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.10.2.bazel new file mode 100644 index 0000000000..7f578b2acd --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cfg-expr-0.10.2.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "cfg_expr", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__smallvec-1.8.0//:smallvec", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel new file mode 100644 index 0000000000..e4aab64083 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "cfg_if", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-0.4.19.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-0.4.19.bazel new file mode 100644 index 0000000000..a28b567426 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.chrono-0.4.19.bazel @@ -0,0 +1,104 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "chrono", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "clock", + "libc", + "std", + "winapi", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.19", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + "@crate_index__libc-0.2.119//:libc", + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-traits-0.2.14//:num_traits", + ], + "//conditions:default": [ + "@crate_index__libc-0.2.119//:libc", + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-traits-0.2.14//:num_traits", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.6.1.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.6.1.bazel new file mode 100644 index 0000000000..9fe3d72241 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.chrono-tz-0.6.1.bazel @@ -0,0 +1,178 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "chrono_tz", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__chrono-0.4.19//:chrono", + "@crate_index__chrono-tz-0.6.1//:build_script_build", + "@crate_index__phf-0.10.1//:phf", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "chrono-tz_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.6.1", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__chrono-tz-build-0.0.2//:chrono_tz_build", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "chrono-tz_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.0.2.bazel new file mode 100644 index 0000000000..ff11da9272 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.chrono-tz-build-0.0.2.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "chrono_tz_build", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.0.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__parse-zoneinfo-0.3.0//:parse_zoneinfo", + "@crate_index__phf-0.10.1//:phf", + "@crate_index__phf_codegen-0.10.0//:phf_codegen", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.clap-3.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.clap-3.1.5.bazel new file mode 100644 index 0000000000..288246b80a --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.clap-3.1.5.bazel @@ -0,0 +1,104 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "clap", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "atty", + "clap_derive", + "color", + "default", + "derive", + "env", + "lazy_static", + "std", + "strsim", + "suggestions", + "termcolor", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__clap_derive-3.1.4//:clap_derive", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "3.1.5", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__atty-0.2.14//:atty", + "@crate_index__bitflags-1.3.2//:bitflags", + "@crate_index__indexmap-1.8.0//:indexmap", + "@crate_index__lazy_static-1.4.0//:lazy_static", + "@crate_index__os_str_bytes-6.0.0//:os_str_bytes", + "@crate_index__strsim-0.10.0//:strsim", + "@crate_index__termcolor-1.1.3//:termcolor", + "@crate_index__textwrap-0.15.0//:textwrap", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.clap_derive-3.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.clap_derive-3.1.4.bazel new file mode 100644 index 0000000000..be1c87c7d4 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.clap_derive-3.1.4.bazel @@ -0,0 +1,90 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_proc_macro", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_proc_macro( + name = "clap_derive", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "3.1.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__heck-0.4.0//:heck", + "@crate_index__proc-macro-error-1.0.4//:proc_macro_error", + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + "@crate_index__syn-1.0.86//:syn", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.1.bazel new file mode 100644 index 0000000000..c9f420ca99 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.cpufeatures-0.2.1.bazel @@ -0,0 +1,102 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "cpufeatures", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.1", + deps = [ + ] + select_with_or({ + # aarch64-apple-darwin + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + # cfg(all(target_arch = "aarch64", target_os = "linux")) + ( + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.crates-index-0.18.7.bazel b/crate_universe/3rdparty/crates/BUILD.crates-index-0.18.7.bazel new file mode 100644 index 0000000000..085bbd5f28 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.crates-index-0.18.7.bazel @@ -0,0 +1,95 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "crates_index", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde_derive-1.0.136//:serde_derive", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.18.7", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__git2-0.14.1//:git2", + "@crate_index__hex-0.4.3//:hex", + "@crate_index__home-0.5.3//:home", + "@crate_index__memchr-2.4.1//:memchr", + "@crate_index__num_cpus-1.13.1//:num_cpus", + "@crate_index__rustc-hash-1.1.0//:rustc_hash", + "@crate_index__semver-1.0.6//:semver", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__serde_json-1.0.79//:serde_json", + "@crate_index__smartstring-1.0.0//:smartstring", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.7.bazel b/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.7.bazel new file mode 100644 index 0000000000..228b9ea44a --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.crossbeam-utils-0.8.7.bazel @@ -0,0 +1,179 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "crossbeam_utils", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "lazy_static", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.7", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__crossbeam-utils-0.8.7//:build_script_build", + "@crate_index__lazy_static-1.4.0//:lazy_static", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "crossbeam-utils_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "lazy_static", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.8.7", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "crossbeam-utils_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.3.bazel new file mode 100644 index 0000000000..269f2d85e9 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.crypto-common-0.1.3.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "crypto_common", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__generic-array-0.14.5//:generic_array", + "@crate_index__typenum-1.15.0//:typenum", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel new file mode 100644 index 0000000000..dbea22a3a0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.deunicode-0.4.3.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # BSD-3-Clause +# ]) + +rust_library( + name = "deunicode", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.digest-0.10.3.bazel b/crate_universe/3rdparty/crates/BUILD.digest-0.10.3.bazel new file mode 100644 index 0000000000..05666355f7 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.digest-0.10.3.bazel @@ -0,0 +1,91 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "digest", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "block-buffer", + "core-api", + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__block-buffer-0.10.2//:block_buffer", + "@crate_index__crypto-common-0.1.3//:crypto_common", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.digest-0.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.digest-0.8.1.bazel new file mode 100644 index 0000000000..ffcb916bf8 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.digest-0.8.1.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "digest", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__generic-array-0.12.4//:generic_array", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.fake-simd-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.fake-simd-0.1.2.bazel new file mode 100644 index 0000000000..b5f46a23fe --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.fake-simd-0.1.2.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "fake_simd", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.fastrand-1.7.0.bazel b/crate_universe/3rdparty/crates/BUILD.fastrand-1.7.0.bazel new file mode 100644 index 0000000000..46531644e4 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.fastrand-1.7.0.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "fastrand", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.7.0", + deps = [ + ] + select_with_or({ + # cfg(target_arch = "wasm32") + ( + "@rules_rust//rust/platform:wasm32-unknown-unknown", + "@rules_rust//rust/platform:wasm32-wasi", + ): [ + # Target Deps + "@crate_index__instant-0.1.12//:instant", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel b/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel new file mode 100644 index 0000000000..9b3c6e3832 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.fnv-1.0.7.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 / MIT +# ]) + +rust_library( + name = "fnv", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.7", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.0.1.bazel new file mode 100644 index 0000000000..55ca7b51fd --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.form_urlencoded-1.0.1.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "form_urlencoded", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__matches-0.1.9//:matches", + "@crate_index__percent-encoding-2.1.0//:percent_encoding", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel new file mode 100644 index 0000000000..13c5d65c8f --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.fuchsia-cprng-0.1.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # +# ]) + +rust_library( + name = "fuchsia_cprng", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.generic-array-0.12.4.bazel b/crate_universe/3rdparty/crates/BUILD.generic-array-0.12.4.bazel new file mode 100644 index 0000000000..34536b745a --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.generic-array-0.12.4.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "generic_array", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.12.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__typenum-1.15.0//:typenum", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.5.bazel b/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.5.bazel new file mode 100644 index 0000000000..9d7fc09140 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.generic-array-0.14.5.bazel @@ -0,0 +1,175 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "generic_array", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "more_lengths", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.14.5", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__generic-array-0.14.5//:build_script_build", + "@crate_index__typenum-1.15.0//:typenum", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "generic-array_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "more_lengths", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.14.5", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__version_check-0.9.4//:version_check", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "generic-array_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.5.bazel b/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.5.bazel new file mode 100644 index 0000000000..0c73b2da65 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.getrandom-0.2.5.bazel @@ -0,0 +1,122 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "getrandom", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.5", + deps = [ + ] + select_with_or({ + # cfg(target_os = "wasi") + ( + "@rules_rust//rust/platform:wasm32-wasi", + ): [ + # Target Deps + "@crate_index__wasi-0.10.2-wasi-snapshot-preview1//:wasi", + + # Common Deps + "@crate_index__cfg-if-1.0.0//:cfg_if", + ], + # cfg(unix) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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-linux-android", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + "@crate_index__cfg-if-1.0.0//:cfg_if", + ], + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.git2-0.14.1.bazel b/crate_universe/3rdparty/crates/BUILD.git2-0.14.1.bazel new file mode 100644 index 0000000000..1a3d468e15 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.git2-0.14.1.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "git2", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.14.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__bitflags-1.3.2//:bitflags", + "@crate_index__libc-0.2.119//:libc", + "@crate_index__libgit2-sys-0.13.1-1.4.2//:libgit2_sys", + "@crate_index__log-0.4.14//:log", + "@crate_index__url-2.2.2//:url", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.globset-0.4.8.bazel b/crate_universe/3rdparty/crates/BUILD.globset-0.4.8.bazel new file mode 100644 index 0000000000..e38b033edd --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.globset-0.4.8.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "globset", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.8", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__aho-corasick-0.7.18//:aho_corasick", + "@crate_index__bstr-0.2.17//:bstr", + "@crate_index__fnv-1.0.7//:fnv", + "@crate_index__log-0.4.14//:log", + "@crate_index__regex-1.5.4//:regex", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel b/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel new file mode 100644 index 0000000000..f66d00a46d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.globwalk-0.8.1.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "globwalk", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__bitflags-1.3.2//:bitflags", + "@crate_index__ignore-0.4.18//:ignore", + "@crate_index__walkdir-2.3.2//:walkdir", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.hashbrown-0.11.2.bazel b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.11.2.bazel new file mode 100644 index 0000000000..54a071bfc5 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.hashbrown-0.11.2.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0/MIT +# ]) + +rust_library( + name = "hashbrown", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "raw", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.11.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.heck-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.heck-0.4.0.bazel new file mode 100644 index 0000000000..f8a2a8e3a5 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.heck-0.4.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "heck", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.1.19.bazel b/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.1.19.bazel new file mode 100644 index 0000000000..87a0e63084 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.hermit-abi-0.1.19.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "hermit_abi", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.19", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__libc-0.2.119//:libc", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel b/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel new file mode 100644 index 0000000000..532d6eb0ae --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.hex-0.4.3.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "hex", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "default", + "serde", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:serde", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.home-0.5.3.bazel b/crate_universe/3rdparty/crates/BUILD.home-0.5.3.bazel new file mode 100644 index 0000000000..d500a98551 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.home-0.5.3.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "home", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.5.3", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.humansize-1.1.1.bazel b/crate_universe/3rdparty/crates/BUILD.humansize-1.1.1.bazel new file mode 100644 index 0000000000..48be3d7dbe --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.humansize-1.1.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "humansize", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.idna-0.2.3.bazel b/crate_universe/3rdparty/crates/BUILD.idna-0.2.3.bazel new file mode 100644 index 0000000000..d414d18b6b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.idna-0.2.3.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "idna", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__matches-0.1.9//:matches", + "@crate_index__unicode-bidi-0.3.7//:unicode_bidi", + "@crate_index__unicode-normalization-0.1.19//:unicode_normalization", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel b/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel new file mode 100644 index 0000000000..3d8cc4bf3b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.ignore-0.4.18.bazel @@ -0,0 +1,112 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "ignore", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.18", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-util-0.1.5//:winapi_util", + + # Common Deps + "@crate_index__crossbeam-utils-0.8.7//:crossbeam_utils", + "@crate_index__globset-0.4.8//:globset", + "@crate_index__lazy_static-1.4.0//:lazy_static", + "@crate_index__log-0.4.14//:log", + "@crate_index__memchr-2.4.1//:memchr", + "@crate_index__regex-1.5.4//:regex", + "@crate_index__same-file-1.0.6//:same_file", + "@crate_index__thread_local-1.1.4//:thread_local", + "@crate_index__walkdir-2.3.2//:walkdir", + ], + "//conditions:default": [ + "@crate_index__crossbeam-utils-0.8.7//:crossbeam_utils", + "@crate_index__globset-0.4.8//:globset", + "@crate_index__lazy_static-1.4.0//:lazy_static", + "@crate_index__log-0.4.14//:log", + "@crate_index__memchr-2.4.1//:memchr", + "@crate_index__regex-1.5.4//:regex", + "@crate_index__same-file-1.0.6//:same_file", + "@crate_index__thread_local-1.1.4//:thread_local", + "@crate_index__walkdir-2.3.2//:walkdir", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.indexmap-1.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.indexmap-1.8.0.bazel new file mode 100644 index 0000000000..18e7ed79e6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.indexmap-1.8.0.bazel @@ -0,0 +1,175 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0/MIT +# ]) + +rust_library( + name = "indexmap", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.8.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__hashbrown-0.11.2//:hashbrown", + "@crate_index__indexmap-1.8.0//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "indexmap_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.8.0", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__autocfg-1.1.0//:autocfg", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "indexmap_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.instant-0.1.12.bazel b/crate_universe/3rdparty/crates/BUILD.instant-0.1.12.bazel new file mode 100644 index 0000000000..97683a6bcf --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.instant-0.1.12.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # BSD-3-Clause +# ]) + +rust_library( + name = "instant", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.12", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.itoa-1.0.1.bazel b/crate_universe/3rdparty/crates/BUILD.itoa-1.0.1.bazel new file mode 100644 index 0000000000..69bfcf9067 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.itoa-1.0.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "itoa", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.jobserver-0.1.24.bazel b/crate_universe/3rdparty/crates/BUILD.jobserver-0.1.24.bazel new file mode 100644 index 0000000000..6e08f26aa0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.jobserver-0.1.24.bazel @@ -0,0 +1,109 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "jobserver", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.24", + deps = [ + ] + select_with_or({ + # cfg(unix) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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-linux-android", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel new file mode 100644 index 0000000000..aabde66916 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "lazy_static", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.4.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.libc-0.2.119.bazel b/crate_universe/3rdparty/crates/BUILD.libc-0.2.119.bazel new file mode 100644 index 0000000000..57c96d1d20 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.libc-0.2.119.bazel @@ -0,0 +1,175 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "libc", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.119", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__libc-0.2.119//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "libc_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.2.119", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "libc_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.libgit2-sys-0.13.1+1.4.2.bazel b/crate_universe/3rdparty/crates/BUILD.libgit2-sys-0.13.1+1.4.2.bazel new file mode 100644 index 0000000000..1f86220253 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.libgit2-sys-0.13.1+1.4.2.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "libgit2_sys", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.13.1+1.4.2", + deps = [ + "@libgit2", + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__libc-0.2.119//:libc", + "@crate_index__libz-sys-1.1.3//:libz_sys", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.libz-sys-1.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.libz-sys-1.1.3.bazel new file mode 100644 index 0000000000..725a428eda --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.libz-sys-1.1.3.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "libz_sys", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "libc", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.3", + deps = [ + "@zlib", + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__libc-0.2.119//:libc", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.log-0.4.14.bazel b/crate_universe/3rdparty/crates/BUILD.log-0.4.14.bazel new file mode 100644 index 0000000000..6471f8da9d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.log-0.4.14.bazel @@ -0,0 +1,172 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "log", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.14", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__log-0.4.14//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "log_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.4.14", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "log_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel b/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel new file mode 100644 index 0000000000..c7e2e04e3c --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.maplit-1.0.2.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "maplit", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.matches-0.1.9.bazel b/crate_universe/3rdparty/crates/BUILD.matches-0.1.9.bazel new file mode 100644 index 0000000000..b2ec92b39b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.matches-0.1.9.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "matches", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.9", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.memchr-2.4.1.bazel b/crate_universe/3rdparty/crates/BUILD.memchr-2.4.1.bazel new file mode 100644 index 0000000000..ae3c518d4d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.memchr-2.4.1.bazel @@ -0,0 +1,175 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "memchr", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.4.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__memchr-2.4.1//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "memchr_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "2.4.1", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "memchr_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel b/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel new file mode 100644 index 0000000000..e64c7e9bcc --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-0.1.42.bazel @@ -0,0 +1,98 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "num", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "bigint", + "complex", + "default", + "num-bigint", + "num-complex", + "num-rational", + "rational", + "rustc-serialize", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.42", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-bigint-0.1.44//:num_bigint", + "@crate_index__num-complex-0.1.43//:num_complex", + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-iter-0.1.42//:num_iter", + "@crate_index__num-rational-0.1.42//:num_rational", + "@crate_index__num-traits-0.2.14//:num_traits", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel b/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel new file mode 100644 index 0000000000..861ff696a9 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-bigint-0.1.44.bazel @@ -0,0 +1,91 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "num_bigint", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "rand", + "rustc-serialize", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.44", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-traits-0.2.14//:num_traits", + "@crate_index__rand-0.4.6//:rand", + "@crate_index__rustc-serialize-0.3.24//:rustc_serialize", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel b/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel new file mode 100644 index 0000000000..07ee2082e8 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-complex-0.1.43.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "num_complex", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "rustc-serialize", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.43", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-traits-0.2.14//:num_traits", + "@crate_index__rustc-serialize-0.3.24//:rustc_serialize", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.44.bazel b/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.44.bazel new file mode 100644 index 0000000000..b8e125da86 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-integer-0.1.44.bazel @@ -0,0 +1,177 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "num_integer", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.44", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-integer-0.1.44//:build_script_build", + "@crate_index__num-traits-0.2.14//:num_traits", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "num-integer_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.1.44", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__autocfg-1.1.0//:autocfg", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "num-integer_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.42.bazel b/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.42.bazel new file mode 100644 index 0000000000..926481a2d2 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-iter-0.1.42.bazel @@ -0,0 +1,178 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "num_iter", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.42", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-iter-0.1.42//:build_script_build", + "@crate_index__num-traits-0.2.14//:num_traits", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "num-iter_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.1.42", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__autocfg-1.1.0//:autocfg", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "num-iter_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel b/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel new file mode 100644 index 0000000000..1b3ca21f50 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-rational-0.1.42.bazel @@ -0,0 +1,92 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "num_rational", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "bigint", + "default", + "num-bigint", + "rustc-serialize", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.42", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-bigint-0.1.44//:num_bigint", + "@crate_index__num-integer-0.1.44//:num_integer", + "@crate_index__num-traits-0.2.14//:num_traits", + "@crate_index__rustc-serialize-0.3.24//:rustc_serialize", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.14.bazel b/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.14.bazel new file mode 100644 index 0000000000..0b5ebe1476 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num-traits-0.2.14.bazel @@ -0,0 +1,176 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "num_traits", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.14", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-traits-0.2.14//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "num-traits_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.2.14", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__autocfg-1.1.0//:autocfg", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "num-traits_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.num_cpus-1.13.1.bazel b/crate_universe/3rdparty/crates/BUILD.num_cpus-1.13.1.bazel new file mode 100644 index 0000000000..9cb3763f7e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.num_cpus-1.13.1.bazel @@ -0,0 +1,116 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "num_cpus", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.13.1", + deps = [ + ] + select_with_or({ + # cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit")) + # + # No supported platform triples for cfg: 'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))' + # Skipped dependencies: [{"id":"hermit-abi 0.1.19","target":"hermit_abi"}] + # + # cfg(not(windows)) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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:wasm32-unknown-unknown", + "@rules_rust//rust/platform:wasm32-wasi", + "@rules_rust//rust/platform:x86_64-apple-darwin", + "@rules_rust//rust/platform:x86_64-apple-ios", + "@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", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.once_cell-1.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.once_cell-1.9.0.bazel new file mode 100644 index 0000000000..f2a936a83c --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.once_cell-1.9.0.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "once_cell", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "default", + "race", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.opaque-debug-0.2.3.bazel b/crate_universe/3rdparty/crates/BUILD.opaque-debug-0.2.3.bazel new file mode 100644 index 0000000000..f3278313b3 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.opaque-debug-0.2.3.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "opaque_debug", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.os_str_bytes-6.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.os_str_bytes-6.0.0.bazel new file mode 100644 index 0000000000..10bd190786 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.os_str_bytes-6.0.0.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "os_str_bytes", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "memchr", + "raw_os_str", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "6.0.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__memchr-2.4.1//:memchr", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel b/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel new file mode 100644 index 0000000000..f825ee19b0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.parse-zoneinfo-0.3.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "parse_zoneinfo", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__regex-1.5.4//:regex", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel b/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel new file mode 100644 index 0000000000..4aade0820a --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pathdiff-0.2.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "pathdiff", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.1.0.bazel new file mode 100644 index 0000000000..1ad467a69d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.percent-encoding-2.1.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "percent_encoding", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pest-2.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.pest-2.1.3.bazel new file mode 100644 index 0000000000..47afac4774 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pest-2.1.3.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "pest", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.1.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__ucd-trie-0.1.3//:ucd_trie", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pest_derive-2.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.pest_derive-2.1.0.bazel new file mode 100644 index 0000000000..53c8c158b5 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pest_derive-2.1.0.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_proc_macro", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_proc_macro( + name = "pest_derive", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__pest-2.1.3//:pest", + "@crate_index__pest_generator-2.1.3//:pest_generator", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pest_generator-2.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.pest_generator-2.1.3.bazel new file mode 100644 index 0000000000..1370e95fac --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pest_generator-2.1.3.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "pest_generator", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.1.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__pest-2.1.3//:pest", + "@crate_index__pest_meta-2.1.3//:pest_meta", + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + "@crate_index__syn-1.0.86//:syn", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pest_meta-2.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.pest_meta-2.1.3.bazel new file mode 100644 index 0000000000..81b94cabf3 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pest_meta-2.1.3.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "pest_meta", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.1.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__maplit-1.0.2//:maplit", + "@crate_index__pest-2.1.3//:pest", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.phf-0.10.1.bazel b/crate_universe/3rdparty/crates/BUILD.phf-0.10.1.bazel new file mode 100644 index 0000000000..567ec45953 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.phf-0.10.1.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "phf", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "uncased", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__phf_shared-0.10.0//:phf_shared", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.10.0.bazel new file mode 100644 index 0000000000..7d8a09ffad --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.phf_codegen-0.10.0.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "phf_codegen", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__phf_generator-0.10.0//:phf_generator", + "@crate_index__phf_shared-0.10.0//:phf_shared", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.phf_generator-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.phf_generator-0.10.0.bazel new file mode 100644 index 0000000000..2399789275 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.phf_generator-0.10.0.bazel @@ -0,0 +1,150 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "phf_generator", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__phf_shared-0.10.0//:phf_shared", + "@crate_index__rand-0.8.5//:rand", + ], + }), +) + +rust_binary( + name = "gen_hash_test__bin", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/bin/gen_hash_test.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.0", + deps = [ + ":phf_generator", + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__phf_shared-0.10.0//:phf_shared", + "@crate_index__rand-0.8.5//:rand", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.phf_shared-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.phf_shared-0.10.0.bazel new file mode 100644 index 0000000000..ff6ae0cd76 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.phf_shared-0.10.0.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "phf_shared", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + "uncased", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__siphasher-0.3.9//:siphasher", + "@crate_index__uncased-0.9.6//:uncased", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.pkg-config-0.3.24.bazel b/crate_universe/3rdparty/crates/BUILD.pkg-config-0.3.24.bazel new file mode 100644 index 0000000000..d0f2e513b6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.pkg-config-0.3.24.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "pkg_config", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.24", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.16.bazel b/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.16.bazel new file mode 100644 index 0000000000..f93bf6871c --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.ppv-lite86-0.2.16.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "ppv_lite86", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "simd", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.16", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.proc-macro-error-1.0.4.bazel b/crate_universe/3rdparty/crates/BUILD.proc-macro-error-1.0.4.bazel new file mode 100644 index 0000000000..234edf19bd --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.proc-macro-error-1.0.4.bazel @@ -0,0 +1,182 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "proc_macro_error", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "syn", + "syn-error", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro-error-attr-1.0.4//:proc_macro_error_attr", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro-error-1.0.4//:build_script_build", + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + "@crate_index__syn-1.0.86//:syn", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "proc-macro-error_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "syn", + "syn-error", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.4", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__version_check-0.9.4//:version_check", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "proc-macro-error_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.proc-macro-error-attr-1.0.4.bazel b/crate_universe/3rdparty/crates/BUILD.proc-macro-error-attr-1.0.4.bazel new file mode 100644 index 0000000000..5753e76f93 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.proc-macro-error-attr-1.0.4.bazel @@ -0,0 +1,174 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_proc_macro", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_proc_macro( + name = "proc_macro_error_attr", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro-error-attr-1.0.4//:build_script_build", + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "proc-macro-error-attr_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.4", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__version_check-0.9.4//:version_check", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "proc-macro-error-attr_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.36.bazel b/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.36.bazel new file mode 100644 index 0000000000..7b9e4c2b5e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.proc-macro2-1.0.36.bazel @@ -0,0 +1,176 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "proc_macro2", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "proc-macro", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.36", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro2-1.0.36//:build_script_build", + "@crate_index__unicode-xid-0.2.2//:unicode_xid", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "proc-macro2_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "proc-macro", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.36", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "proc-macro2_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.quote-1.0.15.bazel b/crate_universe/3rdparty/crates/BUILD.quote-1.0.15.bazel new file mode 100644 index 0000000000..da83b59ca8 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.quote-1.0.15.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "quote", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "proc-macro", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.15", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel b/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel new file mode 100644 index 0000000000..fd20593262 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand-0.4.6.bazel @@ -0,0 +1,132 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "rand", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "libc", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.6", + deps = [ + ] + select_with_or({ + # cfg(target_env = "sgx") + # + # No supported platform triples for cfg: 'cfg(target_env = "sgx")' + # Skipped dependencies: [{"id":"rand_core 0.3.1","target":"rand_core"},{"id":"rdrand 0.4.0","target":"rdrand"}] + # + # cfg(target_os = "fuchsia") + # + # No supported platform triples for cfg: 'cfg(target_os = "fuchsia")' + # Skipped dependencies: [{"id":"fuchsia-cprng 0.1.1","target":"fuchsia_cprng"}] + # + # cfg(unix) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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-linux-android", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + ], + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel b/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel new file mode 100644 index 0000000000..33dfcf85f6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand-0.8.5.bazel @@ -0,0 +1,121 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "default", + "getrandom", + "libc", + "rand_chacha", + "small_rng", + "std", + "std_rng", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.5", + deps = [ + ] + select_with_or({ + # cfg(unix) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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-linux-android", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + "@crate_index__rand_chacha-0.3.1//:rand_chacha", + "@crate_index__rand_core-0.6.3//:rand_core", + ], + "//conditions:default": [ + "@crate_index__rand_chacha-0.3.1//:rand_chacha", + "@crate_index__rand_core-0.6.3//:rand_core", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel new file mode 100644 index 0000000000..b6eab72b74 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_chacha", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__ppv-lite86-0.2.16//:ppv_lite86", + "@crate_index__rand_core-0.6.3//:rand_core", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel new file mode 100644 index 0000000000..3be752f376 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.3.1.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "rand_core", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__rand_core-0.4.2//:rand_core", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel new file mode 100644 index 0000000000..d835c72d1f --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.4.2.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "rand_core", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.3.bazel b/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.3.bazel new file mode 100644 index 0000000000..ac7f43be59 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rand_core-0.6.3.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_core", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "getrandom", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__getrandom-0.2.5//:getrandom", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel new file mode 100644 index 0000000000..16c3ff58ce --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rdrand-0.4.0.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # ISC +# ]) + +rust_library( + name = "rdrand", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__rand_core-0.3.1//:rand_core", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.2.11.bazel b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.2.11.bazel new file mode 100644 index 0000000000..d06e9f0e03 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.redox_syscall-0.2.11.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "syscall", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.11", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__bitflags-1.3.2//:bitflags", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.regex-1.5.4.bazel b/crate_universe/3rdparty/crates/BUILD.regex-1.5.4.bazel new file mode 100644 index 0000000000..da772c0d5c --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.regex-1.5.4.bazel @@ -0,0 +1,104 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "regex", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "aho-corasick", + "default", + "memchr", + "perf", + "perf-cache", + "perf-dfa", + "perf-inline", + "perf-literal", + "std", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.5.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__aho-corasick-0.7.18//:aho_corasick", + "@crate_index__memchr-2.4.1//:memchr", + "@crate_index__regex-syntax-0.6.25//:regex_syntax", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.6.25.bazel b/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.6.25.bazel new file mode 100644 index 0000000000..8cd2b0b069 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.regex-syntax-0.6.25.bazel @@ -0,0 +1,93 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "regex_syntax", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.25", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.remove_dir_all-0.5.3.bazel b/crate_universe/3rdparty/crates/BUILD.remove_dir_all-0.5.3.bazel new file mode 100644 index 0000000000..11007c8dff --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.remove_dir_all-0.5.3.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "remove_dir_all", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.5.3", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel new file mode 100644 index 0000000000..def8f779b9 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rustc-hash-1.1.0.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0/MIT +# ]) + +rust_library( + name = "rustc_hash", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel b/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel new file mode 100644 index 0000000000..1f90255d56 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.rustc-serialize-0.3.24.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "rustc_serialize", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.24", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.ryu-1.0.9.bazel b/crate_universe/3rdparty/crates/BUILD.ryu-1.0.9.bazel new file mode 100644 index 0000000000..c2a9c812f0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.ryu-1.0.9.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR BSL-1.0 +# ]) + +rust_library( + name = "ryu", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.9", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel b/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel new file mode 100644 index 0000000000..0b5a6fd278 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.same-file-1.0.6.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "same_file", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.6", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-util-0.1.5//:winapi_util", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.semver-1.0.6.bazel b/crate_universe/3rdparty/crates/BUILD.semver-1.0.6.bazel new file mode 100644 index 0000000000..eb424d7ef2 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.semver-1.0.6.bazel @@ -0,0 +1,178 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "semver", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "serde", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.6", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__semver-1.0.6//:build_script_build", + "@crate_index__serde-1.0.136//:serde", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "semver_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "serde", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.6", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "semver_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.serde-1.0.136.bazel b/crate_universe/3rdparty/crates/BUILD.serde-1.0.136.bazel new file mode 100644 index 0000000000..9000cb63a1 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.serde-1.0.136.bazel @@ -0,0 +1,182 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "serde", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "derive", + "rc", + "serde_derive", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde_derive-1.0.136//:serde_derive", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.136", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "serde_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "derive", + "rc", + "serde_derive", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.136", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "serde_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.136.bazel b/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.136.bazel new file mode 100644 index 0000000000..86a3203772 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.serde_derive-1.0.136.bazel @@ -0,0 +1,176 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_proc_macro", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_proc_macro( + name = "serde_derive", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.136", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + "@crate_index__serde_derive-1.0.136//:build_script_build", + "@crate_index__syn-1.0.86//:syn", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "serde_derive_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.136", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "serde_derive_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.79.bazel b/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.79.bazel new file mode 100644 index 0000000000..28b6043f41 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.serde_json-1.0.79.bazel @@ -0,0 +1,180 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "serde_json", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + "unbounded_depth", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.79", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__itoa-1.0.1//:itoa", + "@crate_index__ryu-1.0.9//:ryu", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__serde_json-1.0.79//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "serde_json_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + "unbounded_depth", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.79", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "serde_json_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.sha-1-0.8.2.bazel b/crate_universe/3rdparty/crates/BUILD.sha-1-0.8.2.bazel new file mode 100644 index 0000000000..788e2f3c7b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.sha-1-0.8.2.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "sha1", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.8.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__block-buffer-0.7.3//:block_buffer", + "@crate_index__digest-0.8.1//:digest", + "@crate_index__fake-simd-0.1.2//:fake_simd", + "@crate_index__opaque-debug-0.2.3//:opaque_debug", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.sha2-0.10.2.bazel b/crate_universe/3rdparty/crates/BUILD.sha2-0.10.2.bazel new file mode 100644 index 0000000000..3d9fec2343 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.sha2-0.10.2.bazel @@ -0,0 +1,113 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "sha2", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.2", + deps = [ + ] + select_with_or({ + # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:i686-apple-darwin", + "@rules_rust//rust/platform:i686-linux-android", + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:i686-unknown-freebsd", + "@rules_rust//rust/platform:i686-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-linux-android", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-unknown-freebsd", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + # Target Deps + "@crate_index__cpufeatures-0.2.1//:cpufeatures", + + # Common Deps + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__digest-0.10.3//:digest", + ], + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__digest-0.10.3//:digest", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.9.bazel b/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.9.bazel new file mode 100644 index 0000000000..01801aa403 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.siphasher-0.3.9.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "siphasher", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.9", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel new file mode 100644 index 0000000000..0348887c7e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.slug-0.1.4.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "slug", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__deunicode-0.4.3//:deunicode", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.smallvec-1.8.0.bazel b/crate_universe/3rdparty/crates/BUILD.smallvec-1.8.0.bazel new file mode 100644 index 0000000000..a9ae38974b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.smallvec-1.8.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "smallvec", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.8.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.smartstring-1.0.0.bazel b/crate_universe/3rdparty/crates/BUILD.smartstring-1.0.0.bazel new file mode 100644 index 0000000000..4331be2fb0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.smartstring-1.0.0.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MPL-2.0+ +# ]) + +rust_library( + name = "smartstring", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "serde", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2021", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:serde", + "@crate_index__static_assertions-1.1.0//:static_assertions", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel b/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel new file mode 100644 index 0000000000..ba4de44fce --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.smawk-0.3.1.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "smawk", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel b/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel new file mode 100644 index 0000000000..61ad65b695 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.spectral-0.6.0.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "spectral", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "num", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__num-0.1.42//:num", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.static_assertions-1.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.static_assertions-1.1.0.bazel new file mode 100644 index 0000000000..4e9f035585 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.static_assertions-1.1.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "static_assertions", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel b/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel new file mode 100644 index 0000000000..d44fe18857 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.strsim-0.10.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "strsim", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.syn-1.0.86.bazel b/crate_universe/3rdparty/crates/BUILD.syn-1.0.86.bazel new file mode 100644 index 0000000000..fba500915d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.syn-1.0.86.bazel @@ -0,0 +1,190 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "syn", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "clone-impls", + "default", + "derive", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.86", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__proc-macro2-1.0.36//:proc_macro2", + "@crate_index__quote-1.0.15//:quote", + "@crate_index__syn-1.0.86//:build_script_build", + "@crate_index__unicode-xid-0.2.2//:unicode_xid", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "syn_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "clone-impls", + "default", + "derive", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.0.86", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "syn_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.tempfile-3.3.0.bazel b/crate_universe/3rdparty/crates/BUILD.tempfile-3.3.0.bazel new file mode 100644 index 0000000000..67ea9ade25 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.tempfile-3.3.0.bazel @@ -0,0 +1,134 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "tempfile", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "3.3.0", + deps = [ + ] + select_with_or({ + # cfg(any(unix, target_os = "wasi")) + ( + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-linux-android", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", + "@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:wasm32-wasi", + "@rules_rust//rust/platform:x86_64-apple-darwin", + "@rules_rust//rust/platform:x86_64-apple-ios", + "@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", + ): [ + # Target Deps + "@crate_index__libc-0.2.119//:libc", + + # Common Deps + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__fastrand-1.7.0//:fastrand", + "@crate_index__remove_dir_all-0.5.3//:remove_dir_all", + ], + # cfg(target_os = "redox") + # + # No supported platform triples for cfg: 'cfg(target_os = "redox")' + # Skipped dependencies: [{"id":"redox_syscall 0.2.11","target":"syscall"}] + # + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__fastrand-1.7.0//:fastrand", + "@crate_index__remove_dir_all-0.5.3//:remove_dir_all", + ], + "//conditions:default": [ + "@crate_index__cfg-if-1.0.0//:cfg_if", + "@crate_index__fastrand-1.7.0//:fastrand", + "@crate_index__remove_dir_all-0.5.3//:remove_dir_all", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.tera-1.15.0.bazel b/crate_universe/3rdparty/crates/BUILD.tera-1.15.0.bazel new file mode 100644 index 0000000000..644e4bd724 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.tera-1.15.0.bazel @@ -0,0 +1,106 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tera", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "builtins", + "chrono", + "chrono-tz", + "default", + "humansize", + "percent-encoding", + "rand", + "slug", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__pest_derive-2.1.0//:pest_derive", + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.15.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__chrono-0.4.19//:chrono", + "@crate_index__chrono-tz-0.6.1//:chrono_tz", + "@crate_index__globwalk-0.8.1//:globwalk", + "@crate_index__humansize-1.1.1//:humansize", + "@crate_index__lazy_static-1.4.0//:lazy_static", + "@crate_index__percent-encoding-2.1.0//:percent_encoding", + "@crate_index__pest-2.1.3//:pest", + "@crate_index__rand-0.8.5//:rand", + "@crate_index__regex-1.5.4//:regex", + "@crate_index__serde-1.0.136//:serde", + "@crate_index__serde_json-1.0.79//:serde_json", + "@crate_index__slug-0.1.4//:slug", + "@crate_index__unic-segment-0.9.0//:unic_segment", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.termcolor-1.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.termcolor-1.1.3.bazel new file mode 100644 index 0000000000..49d7bb03d4 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.termcolor-1.1.3.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense OR MIT +# ]) + +rust_library( + name = "termcolor", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.3", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-util-0.1.5//:winapi_util", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.textwrap-0.14.2.bazel b/crate_universe/3rdparty/crates/BUILD.textwrap-0.14.2.bazel new file mode 100644 index 0000000000..ec7ccef938 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.textwrap-0.14.2.bazel @@ -0,0 +1,91 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "textwrap", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "smawk", + "unicode-linebreak", + "unicode-width", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.14.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__smawk-0.3.1//:smawk", + "@crate_index__unicode-linebreak-0.1.2//:unicode_linebreak", + "@crate_index__unicode-width-0.1.9//:unicode_width", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.textwrap-0.15.0.bazel b/crate_universe/3rdparty/crates/BUILD.textwrap-0.15.0.bazel new file mode 100644 index 0000000000..6636e2cb16 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.textwrap-0.15.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "textwrap", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.15.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel b/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel new file mode 100644 index 0000000000..ead5237126 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.thread_local-1.1.4.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0/MIT +# ]) + +rust_library( + name = "thread_local", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__once_cell-1.9.0//:once_cell", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.tinyvec-1.5.1.bazel b/crate_universe/3rdparty/crates/BUILD.tinyvec-1.5.1.bazel new file mode 100644 index 0000000000..b36623470d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.tinyvec-1.5.1.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Zlib OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "tinyvec", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "alloc", + "default", + "tinyvec_macros", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.5.1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__tinyvec_macros-0.1.0//:tinyvec_macros", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.0.bazel b/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.0.bazel new file mode 100644 index 0000000000..f29536bf6b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.tinyvec_macros-0.1.0.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 OR Zlib +# ]) + +rust_library( + name = "tinyvec_macros", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.toml-0.5.8.bazel b/crate_universe/3rdparty/crates/BUILD.toml-0.5.8.bazel new file mode 100644 index 0000000000..3aeedb83d6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.toml-0.5.8.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "toml", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.5.8", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__serde-1.0.136//:serde", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.typenum-1.15.0.bazel b/crate_universe/3rdparty/crates/BUILD.typenum-1.15.0.bazel new file mode 100644 index 0000000000..bc9505b1af --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.typenum-1.15.0.bazel @@ -0,0 +1,171 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "typenum", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.15.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__typenum-1.15.0//:build_script_main", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "typenum_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_main", + crate_root = "build/main.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "1.15.0", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_main", + actual = "typenum_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.3.bazel b/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.3.bazel new file mode 100644 index 0000000000..1fee76add4 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.ucd-trie-0.1.3.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "ucd_trie", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.3", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.uncased-0.9.6.bazel b/crate_universe/3rdparty/crates/BUILD.uncased-0.9.6.bazel new file mode 100644 index 0000000000..034645eab6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.uncased-0.9.6.bazel @@ -0,0 +1,172 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "uncased", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.6", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__uncased-0.9.6//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "uncased_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.9.6", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__version_check-0.9.4//:version_check", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "uncased_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel new file mode 100644 index 0000000000..4a1ed99f9e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-char-property-0.9.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_char_property", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__unic-char-range-0.9.0//:unic_char_range", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel new file mode 100644 index 0000000000..446a684436 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-char-range-0.9.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_char_range", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel new file mode 100644 index 0000000000..4827fb071b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-common-0.9.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_common", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel new file mode 100644 index 0000000000..c57a794bcb --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-segment-0.9.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_segment", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__unic-ucd-segment-0.9.0//:unic_ucd_segment", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel new file mode 100644 index 0000000000..dbd70c5d4e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-ucd-segment-0.9.0.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_ucd_segment", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__unic-char-property-0.9.0//:unic_char_property", + "@crate_index__unic-char-range-0.9.0//:unic_char_range", + "@crate_index__unic-ucd-version-0.9.0//:unic_ucd_version", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel b/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel new file mode 100644 index 0000000000..12233f813b --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unic-ucd-version-0.9.0.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unic_ucd_version", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__unic-common-0.9.0//:unic_common", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.7.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.7.bazel new file mode 100644 index 0000000000..b412f9a61d --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unicode-bidi-0.3.7.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT / Apache-2.0 +# ]) + +rust_library( + name = "unicode_bidi", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.7", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.2.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.2.bazel new file mode 100644 index 0000000000..fea1adb9e6 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unicode-linebreak-0.1.2.bazel @@ -0,0 +1,172 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "unicode_linebreak", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__unicode-linebreak-0.1.2//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "unicode-linebreak_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.1.2", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__regex-1.5.4//:regex", + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "unicode-linebreak_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.19.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.19.bazel new file mode 100644 index 0000000000..805ffa9ecc --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unicode-normalization-0.1.19.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unicode_normalization", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.19", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__tinyvec-1.5.1//:tinyvec", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel new file mode 100644 index 0000000000..6b610b7864 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "unicode_width", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.9", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.unicode-xid-0.2.2.bazel b/crate_universe/3rdparty/crates/BUILD.unicode-xid-0.2.2.bazel new file mode 100644 index 0000000000..30562c197f --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.unicode-xid-0.2.2.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "unicode_xid", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.url-2.2.2.bazel b/crate_universe/3rdparty/crates/BUILD.url-2.2.2.bazel new file mode 100644 index 0000000000..e2b0903c80 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.url-2.2.2.bazel @@ -0,0 +1,88 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "url", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.2.2", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__form_urlencoded-1.0.1//:form_urlencoded", + "@crate_index__idna-0.2.3//:idna", + "@crate_index__matches-0.1.9//:matches", + "@crate_index__percent-encoding-2.1.0//:percent_encoding", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.vcpkg-0.2.15.bazel b/crate_universe/3rdparty/crates/BUILD.vcpkg-0.2.15.bazel new file mode 100644 index 0000000000..45dc1156b5 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.vcpkg-0.2.15.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "vcpkg", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.15", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel b/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel new file mode 100644 index 0000000000..2c446b0ef5 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.version_check-0.9.4.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "version_check", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.4", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.2.bazel b/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.2.bazel new file mode 100644 index 0000000000..323795e012 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.walkdir-2.3.2.bazel @@ -0,0 +1,97 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "walkdir", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.3.2", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + "@crate_index__winapi-util-0.1.5//:winapi_util", + + # Common Deps + "@crate_index__same-file-1.0.6//:same_file", + ], + "//conditions:default": [ + "@crate_index__same-file-1.0.6//:same_file", + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel b/crate_universe/3rdparty/crates/BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel new file mode 100644 index 0000000000..aedee2860e --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "wasi", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.10.2+wasi-snapshot-preview1", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel new file mode 100644 index 0000000000..32b584b536 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.winapi-0.3.9.bazel @@ -0,0 +1,213 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "consoleapi", + "errhandlingapi", + "fileapi", + "handleapi", + "minwinbase", + "minwindef", + "ntsecapi", + "processenv", + "profileapi", + "shlobj", + "std", + "timezoneapi", + "winbase", + "wincon", + "winerror", + "winnt", + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.9", + deps = [ + ] + select_with_or({ + # i686-pc-windows-gnu + # + # No supported platform triples for cfg: 'i686-pc-windows-gnu' + # Skipped dependencies: [{"id":"winapi-i686-pc-windows-gnu 0.4.0","target":"winapi_i686_pc_windows_gnu"}] + # + # x86_64-pc-windows-gnu + # + # No supported platform triples for cfg: 'x86_64-pc-windows-gnu' + # Skipped dependencies: [{"id":"winapi-x86_64-pc-windows-gnu 0.4.0","target":"winapi_x86_64_pc_windows_gnu"}] + # + "//conditions:default": [ + "@crate_index__winapi-0.3.9//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "winapi_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + "consoleapi", + "errhandlingapi", + "fileapi", + "handleapi", + "minwinbase", + "minwindef", + "ntsecapi", + "processenv", + "profileapi", + "shlobj", + "std", + "timezoneapi", + "winbase", + "wincon", + "winerror", + "winnt", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.3.9", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "winapi_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel new file mode 100644 index 0000000000..0935a2c70a --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel @@ -0,0 +1,171 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi_i686_pc_windows_gnu", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__winapi-i686-pc-windows-gnu-0.4.0//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "winapi-i686-pc-windows-gnu_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.4.0", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "winapi-i686-pc-windows-gnu_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel new file mode 100644 index 0000000000..44dd9b5ff0 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.winapi-util-0.1.5.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "winapi_util", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2018", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.5", + deps = [ + ] + select_with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:i686-pc-windows-msvc", + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + # Target Deps + "@crate_index__winapi-0.3.9//:winapi", + + # Common Deps + ], + "//conditions:default": [ + ], + }), +) diff --git a/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel b/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel new file mode 100644 index 0000000000..13b50eea44 --- /dev/null +++ b/crate_universe/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel @@ -0,0 +1,171 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### + +load( + "@bazel_skylib//lib:selects.bzl", + "selects", +) +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", +) + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or") +load( + "@rules_rust//rust:defs.bzl", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi_x86_64_pc_windows_gnu", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + compile_data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + deps = [ + ] + select_with_or({ + "//conditions:default": [ + "@crate_index__winapi-x86_64-pc-windows-gnu-0.4.0//:build_script_build", + ], + }), +) + +cargo_build_script( + # See comment associated with alias. Do not change this name + name = "winapi-x86_64-pc-windows-gnu_build_script", + srcs = glob( + include = [ + "**/*.rs", + ], + exclude = [ + ], + ), + aliases = selects.with_or({ + "//conditions:default": { + }, + }), + build_script_env = { + }, + compile_data = select_with_or({ + "//conditions:default": [ + ], + }), + crate_features = [ + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob(["**"]) + select_with_or({ + "//conditions:default": [ + ], + }), + edition = "2015", + proc_macro_deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), + rustc_env = { + }, + rustc_env_files = select_with_or({ + "//conditions:default": [ + ], + }), + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ] + select_with_or({ + "//conditions:default": [ + ], + }), + tags = [ + "cargo-bazel", + "manual", + "noclippy", + "norustfmt", + ], + tools = select_with_or({ + "//conditions:default": [ + ], + }), + version = "0.4.0", + visibility = ["//visibility:private"], + deps = [ + ] + select_with_or({ + "//conditions:default": [ + ], + }), +) + +alias( + # Because `cargo_build_script` does some invisible target name mutating to + # determine the package and crate name for a build script, the Bazel + # target namename of any build script cannot be the Cargo canonical name + # of `build_script_build` without losing out on having certain Cargo + # environment variables set. + name = "build_script_build", + actual = "winapi-x86_64-pc-windows-gnu_build_script", + tags = [ + "manual", + ], +) diff --git a/crate_universe/3rdparty/crates/crates.bzl b/crate_universe/3rdparty/crates/crates.bzl new file mode 100644 index 0000000000..d02aa639fd --- /dev/null +++ b/crate_universe/3rdparty/crates/crates.bzl @@ -0,0 +1,25 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### +"""Rules for defining repositories for remote `crates_vendor` repositories""" + +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/3rdparty/crates:defs.bzl", _crate_repositories = "crate_repositories") + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:crates_vendor.bzl", "crates_vendor_remote_repository") + +def crate_repositories(): + maybe( + crates_vendor_remote_repository, + name = "crate_index", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.bazel"), + defs_module = Label("@rules_rust//crate_universe/3rdparty/crates:defs.bzl"), + ) + + _crate_repositories() diff --git a/crate_universe/3rdparty/crates/defs.bzl b/crate_universe/3rdparty/crates/defs.bzl new file mode 100644 index 0000000000..402639109d --- /dev/null +++ b/crate_universe/3rdparty/crates/defs.bzl @@ -0,0 +1,1979 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### +""" +# `crates_repository` API + +- [aliases](#aliases) +- [crate_deps](#crate_deps) +- [all_crate_deps](#all_crate_deps) +- [crate_repositories](#crate_repositories) + +""" + +load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +############################################################################### +# MACROS API +############################################################################### + +# An identifier that represent common dependencies (unconditional). +_COMMON_CONDITION = "" + +def _flatten_dependency_maps(all_dependency_maps): + """Flatten a list of dependency maps into one dictionary. + + Dependency maps have the following structure: + + ```python + DEPENDENCIES_MAP = { + # The first key in the map is a Bazel package + # name of the workspace this file is defined in. + "workspace_member_package": { + + # Not all dependnecies are supported for all platforms. + # the condition key is the condition required to be true + # on the host platform. + "condition": { + + # An alias to a crate target. # The label of the crate target the + # Aliases are only crate names. # package name refers to. + "package_name": "@full//:label", + } + } + } + ``` + + Args: + all_dependency_maps (list): A list of dicts as described above + + Returns: + dict: A dictionary as described above + """ + dependencies = {} + + for workspace_deps_map in all_dependency_maps: + for pkg_name, conditional_deps_map in workspace_deps_map.items(): + if pkg_name not in dependencies: + non_frozen_map = dict() + for key, values in conditional_deps_map.items(): + non_frozen_map.update({key: dict(values.items())}) + dependencies.setdefault(pkg_name, non_frozen_map) + continue + + for condition, deps_map in conditional_deps_map.items(): + # If the condition has not been recorded, do so and continue + if condition not in dependencies[pkg_name]: + dependencies[pkg_name].setdefault(condition, dict(deps_map.items())) + continue + + # Alert on any miss-matched dependencies + inconsistent_entries = [] + for crate_name, crate_label in deps_map.items(): + existing = dependencies[pkg_name][condition].get(crate_name) + if existing and existing != crate_label: + inconsistent_entries.append((crate_name, existing, crate_label)) + dependencies[pkg_name][condition].update({crate_name: crate_label}) + + return dependencies + +def crate_deps(deps, package_name = None): + """Finds the fully qualified label of the requested crates for the package where this macro is called. + + Args: + deps (list): The desired list of crate targets. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()`. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if not deps: + return [] + + if package_name == None: + package_name = native.package_name() + + # Join both sets of dependencies + dependencies = _flatten_dependency_maps([ + _NORMAL_DEPENDENCIES, + _NORMAL_DEV_DEPENDENCIES, + _PROC_MACRO_DEPENDENCIES, + _PROC_MACRO_DEV_DEPENDENCIES, + _BUILD_DEPENDENCIES, + _BUILD_PROC_MACRO_DEPENDENCIES, + ]).pop(package_name, {}) + + # Combine all conditional packages so we can easily index over a flat list + # TODO: Perhaps this should actually return select statements and maintain + # the conditionals of the dependencies + flat_deps = {} + for deps_set in dependencies.values(): + for crate_name, crate_label in deps_set.items(): + flat_deps.update({crate_name: crate_label}) + + missing_crates = [] + crate_targets = [] + for crate_target in deps: + if crate_target not in flat_deps: + missing_crates.append(crate_target) + else: + crate_targets.append(flat_deps[crate_target]) + + if missing_crates: + fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format( + missing_crates, + package_name, + dependencies, + )) + + return crate_targets + +def all_crate_deps( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Finds the fully qualified label of all requested direct crate dependencies \ + for the package where this macro is called. + + If no parameters are set, all normal dependencies are returned. Setting any one flag will + otherwise impact the contents of the returned list. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normla dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_dependency_maps = [] + if normal: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + if normal_dev: + all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES) + if proc_macro: + all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES) + if proc_macro_dev: + all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES) + if build: + all_dependency_maps.append(_BUILD_DEPENDENCIES) + if build_proc_macro: + all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES) + + # Default to always using normal dependencies + if not all_dependency_maps: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + + dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None) + + if not dependencies: + return [] + + crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values()) + for condition, deps in dependencies.items(): + crate_deps += selects.with_or({_CONDITIONS[condition]: deps.values()}) + + return crate_deps + +def aliases( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Produces a map of Crate alias names to their original label + + If no dependency kinds are specified, `normal` and `proc_macro` are used by default. + Setting any one flag will otherwise determine the contents of the returned dict. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normla dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + dict: The aliases of all associated packages + """ + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_aliases_maps = [] + if normal: + all_aliases_maps.append(_NORMAL_ALIASES) + if normal_dev: + all_aliases_maps.append(_NORMAL_DEV_ALIASES) + if proc_macro: + all_aliases_maps.append(_PROC_MACRO_ALIASES) + if proc_macro_dev: + all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES) + if build: + all_aliases_maps.append(_BUILD_ALIASES) + if build_proc_macro: + all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES) + + # Default to always using normal aliases + if not all_aliases_maps: + all_aliases_maps.append(_NORMAL_ALIASES) + all_aliases_maps.append(_PROC_MACRO_ALIASES) + + aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None) + + if not aliases: + return dict() + + common_items = aliases.pop(_COMMON_CONDITION, {}).items() + + # If there are only common items in the dictionary, immediately return them + if not len(aliases.keys()) == 1: + return dict(common_items) + + # Build a single select statement where each conditional has accounted for the + # common set of aliases. + crate_aliases = {"//conditions:default": common_items} + for condition, deps in aliases.items(): + condition_triples = _CONDITIONS[condition] + if condition_triples in crate_aliases: + crate_aliases[condition_triples].update(deps) + else: + crate_aliases.update({_CONDITIONS[condition]: dict(deps.items() + common_items)}) + + return selects.with_or(crate_aliases) + +############################################################################### +# WORKSPACE MEMBER DEPS AND ALIASES +############################################################################### + +_NORMAL_DEPENDENCIES = { + "crate_universe": { + _COMMON_CONDITION: { + "anyhow": "@crate_index__anyhow-1.0.55//:anyhow", + "cargo-lock": "@crate_index__cargo-lock-7.0.1//:cargo_lock", + "cargo-platform": "@crate_index__cargo-platform-0.1.2//:cargo_platform", + "cargo_metadata": "@crate_index__cargo_metadata-0.14.2//:cargo_metadata", + "cargo_toml": "@crate_index__cargo_toml-0.11.4//:cargo_toml", + "cfg-expr": "@crate_index__cfg-expr-0.10.2//:cfg_expr", + "clap": "@crate_index__clap-3.1.5//:clap", + "crates-index": "@crate_index__crates-index-0.18.7//:crates_index", + "hex": "@crate_index__hex-0.4.3//:hex", + "pathdiff": "@crate_index__pathdiff-0.2.1//:pathdiff", + "regex": "@crate_index__regex-1.5.4//:regex", + "semver": "@crate_index__semver-1.0.6//:semver", + "serde": "@crate_index__serde-1.0.136//:serde", + "serde_json": "@crate_index__serde_json-1.0.79//:serde_json", + "sha2": "@crate_index__sha2-0.10.2//:sha2", + "tempfile": "@crate_index__tempfile-3.3.0//:tempfile", + "tera": "@crate_index__tera-1.15.0//:tera", + "textwrap": "@crate_index__textwrap-0.14.2//:textwrap", + "toml": "@crate_index__toml-0.5.8//:toml", + }, + }, + "crate_universe/tools/cross_installer": { + _COMMON_CONDITION: { + "clap": "@crate_index__clap-3.1.5//:clap", + }, + }, + "crate_universe/tools/urls_generator": { + _COMMON_CONDITION: { + "clap": "@crate_index__clap-3.1.5//:clap", + "hex": "@crate_index__hex-0.4.3//:hex", + "serde_json": "@crate_index__serde_json-1.0.79//:serde_json", + "sha2": "@crate_index__sha2-0.10.2//:sha2", + }, + }, +} + +_NORMAL_ALIASES = { + "crate_universe": { + _COMMON_CONDITION: { + }, + }, + "crate_universe/tools/cross_installer": { + _COMMON_CONDITION: { + }, + }, + "crate_universe/tools/urls_generator": { + _COMMON_CONDITION: { + }, + }, +} + +_NORMAL_DEV_DEPENDENCIES = { + "crate_universe": { + _COMMON_CONDITION: { + "spectral": "@crate_index__spectral-0.6.0//:spectral", + }, + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_NORMAL_DEV_ALIASES = { + "crate_universe": { + _COMMON_CONDITION: { + }, + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_PROC_MACRO_DEPENDENCIES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_PROC_MACRO_ALIASES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_PROC_MACRO_DEV_DEPENDENCIES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_PROC_MACRO_DEV_ALIASES = { + "crate_universe": { + _COMMON_CONDITION: { + }, + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_BUILD_DEPENDENCIES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_BUILD_ALIASES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_BUILD_PROC_MACRO_DEPENDENCIES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_BUILD_PROC_MACRO_ALIASES = { + "crate_universe": { + }, + "crate_universe/tools/cross_installer": { + }, + "crate_universe/tools/urls_generator": { + }, +} + +_CONDITIONS = { + "aarch64-apple-darwin": ["aarch64-apple-darwin"], + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [], + "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))": ["aarch64-unknown-linux-gnu"], + "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "i686-apple-darwin", "i686-linux-android", "i686-pc-windows-msvc", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-pc-windows-msvc", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"], + "cfg(any(unix, target_os = \"wasi\"))": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "wasm32-wasi", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"], + "cfg(not(windows))": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "wasm32-unknown-unknown", "wasm32-wasi", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"], + "cfg(target_arch = \"wasm32\")": ["wasm32-unknown-unknown", "wasm32-wasi"], + "cfg(target_env = \"sgx\")": [], + "cfg(target_os = \"fuchsia\")": [], + "cfg(target_os = \"hermit\")": [], + "cfg(target_os = \"redox\")": [], + "cfg(target_os = \"wasi\")": ["wasm32-wasi"], + "cfg(unix)": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"], + "cfg(windows)": ["i686-pc-windows-msvc", "x86_64-pc-windows-msvc"], + "i686-pc-windows-gnu": [], + "x86_64-pc-windows-gnu": [], +} + +############################################################################### + +def crate_repositories(): + """A macro for defining repositories for all generated crates""" + maybe( + http_archive, + name = "crate_index__aho-corasick-0.7.18", + sha256 = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/aho-corasick/0.7.18/download"], + strip_prefix = "aho-corasick-0.7.18", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.aho-corasick-0.7.18.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__anyhow-1.0.55", + sha256 = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/anyhow/1.0.55/download"], + strip_prefix = "anyhow-1.0.55", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.anyhow-1.0.55.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__atty-0.2.14", + sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/atty/0.2.14/download"], + strip_prefix = "atty-0.2.14", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.atty-0.2.14.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__autocfg-1.1.0", + sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/autocfg/1.1.0/download"], + strip_prefix = "autocfg-1.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.autocfg-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__bitflags-1.3.2", + sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/bitflags/1.3.2/download"], + strip_prefix = "bitflags-1.3.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.bitflags-1.3.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__block-buffer-0.10.2", + sha256 = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/block-buffer/0.10.2/download"], + strip_prefix = "block-buffer-0.10.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.block-buffer-0.10.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__block-buffer-0.7.3", + sha256 = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/block-buffer/0.7.3/download"], + strip_prefix = "block-buffer-0.7.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.block-buffer-0.7.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__block-padding-0.1.5", + sha256 = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/block-padding/0.1.5/download"], + strip_prefix = "block-padding-0.1.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.block-padding-0.1.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__bstr-0.2.17", + sha256 = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/bstr/0.2.17/download"], + strip_prefix = "bstr-0.2.17", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.bstr-0.2.17.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__byte-tools-0.3.1", + sha256 = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/byte-tools/0.3.1/download"], + strip_prefix = "byte-tools-0.3.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.byte-tools-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__byteorder-1.4.3", + sha256 = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/byteorder/1.4.3/download"], + strip_prefix = "byteorder-1.4.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.byteorder-1.4.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__camino-1.0.7", + sha256 = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/camino/1.0.7/download"], + strip_prefix = "camino-1.0.7", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.camino-1.0.7.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cargo-lock-7.0.1", + sha256 = "7fb04b88bd5b2036e30704f95c6ee16f3b5ca3b4ca307da2889d9006648e5c88", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cargo-lock/7.0.1/download"], + strip_prefix = "cargo-lock-7.0.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cargo-lock-7.0.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cargo-platform-0.1.2", + sha256 = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cargo-platform/0.1.2/download"], + strip_prefix = "cargo-platform-0.1.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cargo-platform-0.1.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cargo_metadata-0.14.2", + sha256 = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cargo_metadata/0.14.2/download"], + strip_prefix = "cargo_metadata-0.14.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cargo_metadata-0.14.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cargo_toml-0.11.4", + sha256 = "4e270ef0cd868745878982f7ce470aa898d0d4bb248af67f0cf66f54617913ef", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cargo_toml/0.11.4/download"], + strip_prefix = "cargo_toml-0.11.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cargo_toml-0.11.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cc-1.0.73", + sha256 = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cc/1.0.73/download"], + strip_prefix = "cc-1.0.73", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cc-1.0.73.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cfg-expr-0.10.2", + sha256 = "5e068cb2806bbc15b439846dc16c5f89f8599f2c3e4d73d4449d38f9b2f0b6c5", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cfg-expr/0.10.2/download"], + strip_prefix = "cfg-expr-0.10.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cfg-expr-0.10.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cfg-if-1.0.0", + sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cfg-if/1.0.0/download"], + strip_prefix = "cfg-if-1.0.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cfg-if-1.0.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__chrono-0.4.19", + sha256 = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/chrono/0.4.19/download"], + strip_prefix = "chrono-0.4.19", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.chrono-0.4.19.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__chrono-tz-0.6.1", + sha256 = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/chrono-tz/0.6.1/download"], + strip_prefix = "chrono-tz-0.6.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.chrono-tz-0.6.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__chrono-tz-build-0.0.2", + sha256 = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/chrono-tz-build/0.0.2/download"], + strip_prefix = "chrono-tz-build-0.0.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.chrono-tz-build-0.0.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__clap-3.1.5", + sha256 = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/clap/3.1.5/download"], + strip_prefix = "clap-3.1.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.clap-3.1.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__clap_derive-3.1.4", + sha256 = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/clap_derive/3.1.4/download"], + strip_prefix = "clap_derive-3.1.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.clap_derive-3.1.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__cpufeatures-0.2.1", + sha256 = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cpufeatures/0.2.1/download"], + strip_prefix = "cpufeatures-0.2.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.cpufeatures-0.2.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__crates-index-0.18.7", + sha256 = "0044896374c388ccbf1497dad6384bf6111dbcad9d7069506df7450ce9b62ea3", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/crates-index/0.18.7/download"], + strip_prefix = "crates-index-0.18.7", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.crates-index-0.18.7.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__crossbeam-utils-0.8.7", + sha256 = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/crossbeam-utils/0.8.7/download"], + strip_prefix = "crossbeam-utils-0.8.7", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.crossbeam-utils-0.8.7.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__crypto-common-0.1.3", + sha256 = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/crypto-common/0.1.3/download"], + strip_prefix = "crypto-common-0.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.crypto-common-0.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__deunicode-0.4.3", + sha256 = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/deunicode/0.4.3/download"], + strip_prefix = "deunicode-0.4.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.deunicode-0.4.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__digest-0.10.3", + sha256 = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/digest/0.10.3/download"], + strip_prefix = "digest-0.10.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.digest-0.10.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__digest-0.8.1", + sha256 = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/digest/0.8.1/download"], + strip_prefix = "digest-0.8.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.digest-0.8.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__fake-simd-0.1.2", + sha256 = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fake-simd/0.1.2/download"], + strip_prefix = "fake-simd-0.1.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.fake-simd-0.1.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__fastrand-1.7.0", + sha256 = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fastrand/1.7.0/download"], + strip_prefix = "fastrand-1.7.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.fastrand-1.7.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__fnv-1.0.7", + sha256 = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fnv/1.0.7/download"], + strip_prefix = "fnv-1.0.7", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.fnv-1.0.7.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__form_urlencoded-1.0.1", + sha256 = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/form_urlencoded/1.0.1/download"], + strip_prefix = "form_urlencoded-1.0.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.form_urlencoded-1.0.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__fuchsia-cprng-0.1.1", + sha256 = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fuchsia-cprng/0.1.1/download"], + strip_prefix = "fuchsia-cprng-0.1.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.fuchsia-cprng-0.1.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__generic-array-0.12.4", + sha256 = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/generic-array/0.12.4/download"], + strip_prefix = "generic-array-0.12.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.generic-array-0.12.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__generic-array-0.14.5", + sha256 = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/generic-array/0.14.5/download"], + strip_prefix = "generic-array-0.14.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.generic-array-0.14.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__getrandom-0.2.5", + sha256 = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/getrandom/0.2.5/download"], + strip_prefix = "getrandom-0.2.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.getrandom-0.2.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__git2-0.14.1", + sha256 = "6e7d3b96ec1fcaa8431cf04a4f1ef5caafe58d5cf7bcc31f09c1626adddb0ffe", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/git2/0.14.1/download"], + strip_prefix = "git2-0.14.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.git2-0.14.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__globset-0.4.8", + sha256 = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/globset/0.4.8/download"], + strip_prefix = "globset-0.4.8", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.globset-0.4.8.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__globwalk-0.8.1", + sha256 = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/globwalk/0.8.1/download"], + strip_prefix = "globwalk-0.8.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.globwalk-0.8.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__hashbrown-0.11.2", + sha256 = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hashbrown/0.11.2/download"], + strip_prefix = "hashbrown-0.11.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.hashbrown-0.11.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__heck-0.4.0", + sha256 = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/heck/0.4.0/download"], + strip_prefix = "heck-0.4.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.heck-0.4.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__hermit-abi-0.1.19", + sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hermit-abi/0.1.19/download"], + strip_prefix = "hermit-abi-0.1.19", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.hermit-abi-0.1.19.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__hex-0.4.3", + sha256 = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hex/0.4.3/download"], + strip_prefix = "hex-0.4.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.hex-0.4.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__home-0.5.3", + sha256 = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/home/0.5.3/download"], + strip_prefix = "home-0.5.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.home-0.5.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__humansize-1.1.1", + sha256 = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/humansize/1.1.1/download"], + strip_prefix = "humansize-1.1.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.humansize-1.1.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__idna-0.2.3", + sha256 = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/idna/0.2.3/download"], + strip_prefix = "idna-0.2.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.idna-0.2.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__ignore-0.4.18", + sha256 = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/ignore/0.4.18/download"], + strip_prefix = "ignore-0.4.18", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.ignore-0.4.18.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__indexmap-1.8.0", + sha256 = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/indexmap/1.8.0/download"], + strip_prefix = "indexmap-1.8.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.indexmap-1.8.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__instant-0.1.12", + sha256 = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/instant/0.1.12/download"], + strip_prefix = "instant-0.1.12", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.instant-0.1.12.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__itoa-1.0.1", + sha256 = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/itoa/1.0.1/download"], + strip_prefix = "itoa-1.0.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.itoa-1.0.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__jobserver-0.1.24", + sha256 = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/jobserver/0.1.24/download"], + strip_prefix = "jobserver-0.1.24", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.jobserver-0.1.24.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__lazy_static-1.4.0", + sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/lazy_static/1.4.0/download"], + strip_prefix = "lazy_static-1.4.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.lazy_static-1.4.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__libc-0.2.119", + sha256 = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/libc/0.2.119/download"], + strip_prefix = "libc-0.2.119", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.libc-0.2.119.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__libgit2-sys-0.13.1-1.4.2", + sha256 = "43e598aa7a4faedf1ea1b4608f582b06f0f40211eec551b7ef36019ae3f62def", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/libgit2-sys/0.13.1+1.4.2/download"], + strip_prefix = "libgit2-sys-0.13.1+1.4.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.libgit2-sys-0.13.1+1.4.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__libz-sys-1.1.3", + sha256 = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/libz-sys/1.1.3/download"], + strip_prefix = "libz-sys-1.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.libz-sys-1.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__log-0.4.14", + sha256 = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/log/0.4.14/download"], + strip_prefix = "log-0.4.14", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.log-0.4.14.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__maplit-1.0.2", + sha256 = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/maplit/1.0.2/download"], + strip_prefix = "maplit-1.0.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.maplit-1.0.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__matches-0.1.9", + sha256 = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/matches/0.1.9/download"], + strip_prefix = "matches-0.1.9", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.matches-0.1.9.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__memchr-2.4.1", + sha256 = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/memchr/2.4.1/download"], + strip_prefix = "memchr-2.4.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.memchr-2.4.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-0.1.42", + sha256 = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num/0.1.42/download"], + strip_prefix = "num-0.1.42", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-0.1.42.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-bigint-0.1.44", + sha256 = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-bigint/0.1.44/download"], + strip_prefix = "num-bigint-0.1.44", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-bigint-0.1.44.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-complex-0.1.43", + sha256 = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-complex/0.1.43/download"], + strip_prefix = "num-complex-0.1.43", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-complex-0.1.43.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-integer-0.1.44", + sha256 = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-integer/0.1.44/download"], + strip_prefix = "num-integer-0.1.44", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-integer-0.1.44.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-iter-0.1.42", + sha256 = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-iter/0.1.42/download"], + strip_prefix = "num-iter-0.1.42", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-iter-0.1.42.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-rational-0.1.42", + sha256 = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-rational/0.1.42/download"], + strip_prefix = "num-rational-0.1.42", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-rational-0.1.42.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num-traits-0.2.14", + sha256 = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num-traits/0.2.14/download"], + strip_prefix = "num-traits-0.2.14", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num-traits-0.2.14.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__num_cpus-1.13.1", + sha256 = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num_cpus/1.13.1/download"], + strip_prefix = "num_cpus-1.13.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.num_cpus-1.13.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__once_cell-1.9.0", + sha256 = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/once_cell/1.9.0/download"], + strip_prefix = "once_cell-1.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.once_cell-1.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__opaque-debug-0.2.3", + sha256 = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/opaque-debug/0.2.3/download"], + strip_prefix = "opaque-debug-0.2.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.opaque-debug-0.2.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__os_str_bytes-6.0.0", + sha256 = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/os_str_bytes/6.0.0/download"], + strip_prefix = "os_str_bytes-6.0.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.os_str_bytes-6.0.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__parse-zoneinfo-0.3.0", + sha256 = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/parse-zoneinfo/0.3.0/download"], + strip_prefix = "parse-zoneinfo-0.3.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.parse-zoneinfo-0.3.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pathdiff-0.2.1", + sha256 = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pathdiff/0.2.1/download"], + strip_prefix = "pathdiff-0.2.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pathdiff-0.2.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__percent-encoding-2.1.0", + sha256 = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/percent-encoding/2.1.0/download"], + strip_prefix = "percent-encoding-2.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.percent-encoding-2.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pest-2.1.3", + sha256 = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pest/2.1.3/download"], + strip_prefix = "pest-2.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pest-2.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pest_derive-2.1.0", + sha256 = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pest_derive/2.1.0/download"], + strip_prefix = "pest_derive-2.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pest_derive-2.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pest_generator-2.1.3", + sha256 = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pest_generator/2.1.3/download"], + strip_prefix = "pest_generator-2.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pest_generator-2.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pest_meta-2.1.3", + sha256 = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pest_meta/2.1.3/download"], + strip_prefix = "pest_meta-2.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pest_meta-2.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__phf-0.10.1", + sha256 = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/phf/0.10.1/download"], + strip_prefix = "phf-0.10.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.phf-0.10.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__phf_codegen-0.10.0", + sha256 = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/phf_codegen/0.10.0/download"], + strip_prefix = "phf_codegen-0.10.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.phf_codegen-0.10.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__phf_generator-0.10.0", + sha256 = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/phf_generator/0.10.0/download"], + strip_prefix = "phf_generator-0.10.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.phf_generator-0.10.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__phf_shared-0.10.0", + sha256 = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/phf_shared/0.10.0/download"], + strip_prefix = "phf_shared-0.10.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.phf_shared-0.10.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__pkg-config-0.3.24", + sha256 = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pkg-config/0.3.24/download"], + strip_prefix = "pkg-config-0.3.24", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.pkg-config-0.3.24.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__ppv-lite86-0.2.16", + sha256 = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/ppv-lite86/0.2.16/download"], + strip_prefix = "ppv-lite86-0.2.16", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.ppv-lite86-0.2.16.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__proc-macro-error-1.0.4", + sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/proc-macro-error/1.0.4/download"], + strip_prefix = "proc-macro-error-1.0.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.proc-macro-error-1.0.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__proc-macro-error-attr-1.0.4", + sha256 = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/proc-macro-error-attr/1.0.4/download"], + strip_prefix = "proc-macro-error-attr-1.0.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.proc-macro-error-attr-1.0.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__proc-macro2-1.0.36", + sha256 = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/proc-macro2/1.0.36/download"], + strip_prefix = "proc-macro2-1.0.36", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.proc-macro2-1.0.36.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__quote-1.0.15", + sha256 = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/quote/1.0.15/download"], + strip_prefix = "quote-1.0.15", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.quote-1.0.15.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand-0.4.6", + sha256 = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand/0.4.6/download"], + strip_prefix = "rand-0.4.6", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand-0.4.6.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand-0.8.5", + sha256 = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand/0.8.5/download"], + strip_prefix = "rand-0.8.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand-0.8.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand_chacha-0.3.1", + sha256 = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_chacha/0.3.1/download"], + strip_prefix = "rand_chacha-0.3.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand_chacha-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand_core-0.3.1", + sha256 = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_core/0.3.1/download"], + strip_prefix = "rand_core-0.3.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand_core-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand_core-0.4.2", + sha256 = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_core/0.4.2/download"], + strip_prefix = "rand_core-0.4.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand_core-0.4.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rand_core-0.6.3", + sha256 = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_core/0.6.3/download"], + strip_prefix = "rand_core-0.6.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rand_core-0.6.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rdrand-0.4.0", + sha256 = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rdrand/0.4.0/download"], + strip_prefix = "rdrand-0.4.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rdrand-0.4.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__redox_syscall-0.2.11", + sha256 = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/redox_syscall/0.2.11/download"], + strip_prefix = "redox_syscall-0.2.11", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.redox_syscall-0.2.11.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__regex-1.5.4", + sha256 = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/regex/1.5.4/download"], + strip_prefix = "regex-1.5.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.regex-1.5.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__regex-syntax-0.6.25", + sha256 = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/regex-syntax/0.6.25/download"], + strip_prefix = "regex-syntax-0.6.25", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.regex-syntax-0.6.25.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__remove_dir_all-0.5.3", + sha256 = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/remove_dir_all/0.5.3/download"], + strip_prefix = "remove_dir_all-0.5.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.remove_dir_all-0.5.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rustc-hash-1.1.0", + sha256 = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rustc-hash/1.1.0/download"], + strip_prefix = "rustc-hash-1.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rustc-hash-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__rustc-serialize-0.3.24", + sha256 = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rustc-serialize/0.3.24/download"], + strip_prefix = "rustc-serialize-0.3.24", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.rustc-serialize-0.3.24.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__ryu-1.0.9", + sha256 = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/ryu/1.0.9/download"], + strip_prefix = "ryu-1.0.9", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.ryu-1.0.9.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__same-file-1.0.6", + sha256 = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/same-file/1.0.6/download"], + strip_prefix = "same-file-1.0.6", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.same-file-1.0.6.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__semver-1.0.6", + sha256 = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/semver/1.0.6/download"], + strip_prefix = "semver-1.0.6", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.semver-1.0.6.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__serde-1.0.136", + sha256 = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/serde/1.0.136/download"], + strip_prefix = "serde-1.0.136", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.serde-1.0.136.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__serde_derive-1.0.136", + sha256 = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/serde_derive/1.0.136/download"], + strip_prefix = "serde_derive-1.0.136", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.serde_derive-1.0.136.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__serde_json-1.0.79", + sha256 = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/serde_json/1.0.79/download"], + strip_prefix = "serde_json-1.0.79", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.serde_json-1.0.79.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__sha-1-0.8.2", + sha256 = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/sha-1/0.8.2/download"], + strip_prefix = "sha-1-0.8.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.sha-1-0.8.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__sha2-0.10.2", + sha256 = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/sha2/0.10.2/download"], + strip_prefix = "sha2-0.10.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.sha2-0.10.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__siphasher-0.3.9", + sha256 = "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/siphasher/0.3.9/download"], + strip_prefix = "siphasher-0.3.9", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.siphasher-0.3.9.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__slug-0.1.4", + sha256 = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/slug/0.1.4/download"], + strip_prefix = "slug-0.1.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.slug-0.1.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__smallvec-1.8.0", + sha256 = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/smallvec/1.8.0/download"], + strip_prefix = "smallvec-1.8.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.smallvec-1.8.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__smartstring-1.0.0", + sha256 = "ea958ad90cacc8ece7f238fde3671e1b350ee1741964edf2a22fd16f60224163", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/smartstring/1.0.0/download"], + strip_prefix = "smartstring-1.0.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.smartstring-1.0.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__smawk-0.3.1", + sha256 = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/smawk/0.3.1/download"], + strip_prefix = "smawk-0.3.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.smawk-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__spectral-0.6.0", + sha256 = "ae3c15181f4b14e52eeaac3efaeec4d2764716ce9c86da0c934c3e318649c5ba", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/spectral/0.6.0/download"], + strip_prefix = "spectral-0.6.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.spectral-0.6.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__static_assertions-1.1.0", + sha256 = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/static_assertions/1.1.0/download"], + strip_prefix = "static_assertions-1.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.static_assertions-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__strsim-0.10.0", + sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/strsim/0.10.0/download"], + strip_prefix = "strsim-0.10.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.strsim-0.10.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__syn-1.0.86", + sha256 = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/syn/1.0.86/download"], + strip_prefix = "syn-1.0.86", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.syn-1.0.86.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__tempfile-3.3.0", + sha256 = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tempfile/3.3.0/download"], + strip_prefix = "tempfile-3.3.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.tempfile-3.3.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__tera-1.15.0", + sha256 = "d3cac831b615c25bcef632d1cabf864fa05813baad3d526829db18eb70e8b58d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tera/1.15.0/download"], + strip_prefix = "tera-1.15.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.tera-1.15.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__termcolor-1.1.3", + sha256 = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/termcolor/1.1.3/download"], + strip_prefix = "termcolor-1.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.termcolor-1.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__textwrap-0.14.2", + sha256 = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/textwrap/0.14.2/download"], + strip_prefix = "textwrap-0.14.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.textwrap-0.14.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__textwrap-0.15.0", + sha256 = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/textwrap/0.15.0/download"], + strip_prefix = "textwrap-0.15.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.textwrap-0.15.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__thread_local-1.1.4", + sha256 = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/thread_local/1.1.4/download"], + strip_prefix = "thread_local-1.1.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.thread_local-1.1.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__tinyvec-1.5.1", + sha256 = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tinyvec/1.5.1/download"], + strip_prefix = "tinyvec-1.5.1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.tinyvec-1.5.1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__tinyvec_macros-0.1.0", + sha256 = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tinyvec_macros/0.1.0/download"], + strip_prefix = "tinyvec_macros-0.1.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.tinyvec_macros-0.1.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__toml-0.5.8", + sha256 = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/toml/0.5.8/download"], + strip_prefix = "toml-0.5.8", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.toml-0.5.8.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__typenum-1.15.0", + sha256 = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/typenum/1.15.0/download"], + strip_prefix = "typenum-1.15.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.typenum-1.15.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__ucd-trie-0.1.3", + sha256 = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/ucd-trie/0.1.3/download"], + strip_prefix = "ucd-trie-0.1.3", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.ucd-trie-0.1.3.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__uncased-0.9.6", + sha256 = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/uncased/0.9.6/download"], + strip_prefix = "uncased-0.9.6", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.uncased-0.9.6.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-char-property-0.9.0", + sha256 = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-char-property/0.9.0/download"], + strip_prefix = "unic-char-property-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-char-property-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-char-range-0.9.0", + sha256 = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-char-range/0.9.0/download"], + strip_prefix = "unic-char-range-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-char-range-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-common-0.9.0", + sha256 = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-common/0.9.0/download"], + strip_prefix = "unic-common-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-common-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-segment-0.9.0", + sha256 = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-segment/0.9.0/download"], + strip_prefix = "unic-segment-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-segment-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-ucd-segment-0.9.0", + sha256 = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-ucd-segment/0.9.0/download"], + strip_prefix = "unic-ucd-segment-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-ucd-segment-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unic-ucd-version-0.9.0", + sha256 = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unic-ucd-version/0.9.0/download"], + strip_prefix = "unic-ucd-version-0.9.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unic-ucd-version-0.9.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unicode-bidi-0.3.7", + sha256 = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-bidi/0.3.7/download"], + strip_prefix = "unicode-bidi-0.3.7", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unicode-bidi-0.3.7.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unicode-linebreak-0.1.2", + sha256 = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-linebreak/0.1.2/download"], + strip_prefix = "unicode-linebreak-0.1.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unicode-linebreak-0.1.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unicode-normalization-0.1.19", + sha256 = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-normalization/0.1.19/download"], + strip_prefix = "unicode-normalization-0.1.19", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unicode-normalization-0.1.19.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unicode-width-0.1.9", + sha256 = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-width/0.1.9/download"], + strip_prefix = "unicode-width-0.1.9", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unicode-width-0.1.9.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__unicode-xid-0.2.2", + sha256 = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-xid/0.2.2/download"], + strip_prefix = "unicode-xid-0.2.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.unicode-xid-0.2.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__url-2.2.2", + sha256 = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/url/2.2.2/download"], + strip_prefix = "url-2.2.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.url-2.2.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__vcpkg-0.2.15", + sha256 = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/vcpkg/0.2.15/download"], + strip_prefix = "vcpkg-0.2.15", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.vcpkg-0.2.15.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__version_check-0.9.4", + sha256 = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/version_check/0.9.4/download"], + strip_prefix = "version_check-0.9.4", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.version_check-0.9.4.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__walkdir-2.3.2", + sha256 = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/walkdir/2.3.2/download"], + strip_prefix = "walkdir-2.3.2", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.walkdir-2.3.2.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__wasi-0.10.2-wasi-snapshot-preview1", + sha256 = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/wasi/0.10.2+wasi-snapshot-preview1/download"], + strip_prefix = "wasi-0.10.2+wasi-snapshot-preview1", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.wasi-0.10.2+wasi-snapshot-preview1.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__winapi-0.3.9", + sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi/0.3.9/download"], + strip_prefix = "winapi-0.3.9", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.winapi-0.3.9.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__winapi-i686-pc-windows-gnu-0.4.0", + sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download"], + strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__winapi-util-0.1.5", + sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi-util/0.1.5/download"], + strip_prefix = "winapi-util-0.1.5", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.winapi-util-0.1.5.bazel"), + ) + + maybe( + http_archive, + name = "crate_index__winapi-x86_64-pc-windows-gnu-0.4.0", + sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download"], + strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0", + build_file = Label("@rules_rust//crate_universe/3rdparty/crates:BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel"), + ) diff --git a/crate_universe/3rdparty/third_party_deps.bzl b/crate_universe/3rdparty/third_party_deps.bzl new file mode 100644 index 0000000000..54468e4465 --- /dev/null +++ b/crate_universe/3rdparty/third_party_deps.bzl @@ -0,0 +1,28 @@ +"""Third party dependencies of `cargo-bazel`""" + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +def third_party_deps(): + maybe( + http_archive, + name = "zlib", + build_file = Label("//crate_universe/3rdparty:BUILD.zlib.bazel"), + sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", + strip_prefix = "zlib-1.2.11", + urls = [ + "https://zlib.net/zlib-1.2.11.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.11.tar.gz", + ], + ) + + maybe( + http_archive, + name = "libgit2", + build_file = Label("//crate_universe/3rdparty:BUILD.libgit2.bazel"), + sha256 = "9051e75964350054d5e3f9339bc4d1fb56ac14949710e3860f98f07a0433fa25", + # The version here should match the version used with the Rust crate `libgit2-sys` + # https://github.com/rust-lang/git2-rs/tree/libgit2-sys-0.13.0/libgit2-sys + strip_prefix = "libgit2-1.4.0", + urls = ["https://github.com/libgit2/libgit2/archive/refs/tags/v1.4.0.tar.gz"], + ) diff --git a/crate_universe/BUILD.bazel b/crate_universe/BUILD.bazel index b84178a774..6ef161c1ef 100644 --- a/crate_universe/BUILD.bazel +++ b/crate_universe/BUILD.bazel @@ -1,25 +1,130 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@crate_index//:defs.bzl", "aliases", "all_crate_deps") +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc", "rust_library", "rust_test") +load("//crate_universe:version.bzl", "VERSION") -package(default_visibility = ["//visibility:public"]) +exports_files( + glob(["src/**"]) + [ + "Cargo.toml", + "Cargo.lock", + "Cargo.Bazel.lock", + "defs.bzl", + ], + visibility = ["//visibility:public"], +) -exports_files([ - "Cargo.toml", - "Cargo.lock", -]) +filegroup( + name = "distro", + srcs = glob(["*.bzl"]) + [ + ":rust_srcs", + "//crate_universe/3rdparty:distro", + "//crate_universe/private:distro", + "//crate_universe/tools:distro", + "BUILD.bazel", + "Cargo.Bazel.lock", + "Cargo.lock", + "Cargo.toml", + "README.md", + ], + visibility = ["//:__subpackages__"], +) + +filegroup( + name = "bzl_srcs", + srcs = glob(["*.bzl"]) + [ + "//crate_universe/3rdparty:bzl_srcs", + "//crate_universe/private:bzl_srcs", + ], + visibility = ["//visibility:public"], +) bzl_library( name = "bzl_lib", - srcs = glob(["**/*.bzl"]), - deps = ["//crate_universe/private:bzl_lib"], + srcs = [":bzl_srcs"], + visibility = ["//visibility:public"], + deps = ["//rust:bzl_lib"], +) + +filegroup( + name = "rust_srcs", + srcs = glob([ + "src/**/*.rs", + "src/**/*.j2", + ]), + visibility = ["//:__subpackages__"], +) + +TAGS = [ + # https://github.com/rust-lang/rust-clippy/issues/8470 + "noclippy", +] + +rust_library( + name = "cargo_bazel", + srcs = glob( + include = ["src/**/*.rs"], + exclude = ["src/main.rs"], + ), + aliases = aliases(), + compile_data = glob( + include = ["src/**"], + exclude = ["src/**/*.rs"], + ), + proc_macro_deps = all_crate_deps(proc_macro = True), + tags = TAGS, + version = VERSION, + visibility = ["//visibility:public"], + deps = all_crate_deps(normal = True), +) + +rust_binary( + name = "cargo_bazel_bin", + srcs = ["src/main.rs"], + tags = TAGS, + version = VERSION, + visibility = ["//visibility:public"], + deps = [":cargo_bazel"], ) alias( - name = "rules", - actual = ":bzl_lib", - deprecation = "Please use the `@rules_rust//crate_universe:bzl_lib` target instead", + name = "bin", + actual = ":cargo_bazel_bin", + visibility = ["//visibility:public"], ) -filegroup( - name = "resolver_srcs", - srcs = glob(["srcs/**"]), +rust_test( + name = "unit_test", + aliases = aliases(), + crate = ":cargo_bazel", + data = glob(["test_data/**"]) + [ + "@rules_rust//rust/toolchain:current_exec_cargo_files", + "@rules_rust//rust/toolchain:current_exec_rustc_files", + ], + proc_macro_deps = all_crate_deps( + proc_macro_dev = True, + ), + rustc_env = { + "CARGO": "$(rootpath @rules_rust//rust/toolchain:current_exec_cargo_files)", + "RUSTC": "$(rootpath @rules_rust//rust/toolchain:current_exec_rustc_files)", + }, + tags = TAGS, + deps = [ + "@rules_rust//tools/runfiles", + ] + all_crate_deps( + normal_dev = True, + ), +) + +rust_doc( + name = "rustdoc", + crate = ":cargo_bazel", + visibility = ["//visibility:public"], ) + +# `rust_doc_test` does not currently work. See: +# https://github.com/bazelbuild/rules_rust/issues/980 +# +# rust_doc_test( +# name = "rustdoc_test", +# crate = ":cargo_bazel", +# ) diff --git a/crate_universe/CONTRIBUTING.md b/crate_universe/CONTRIBUTING.md deleted file mode 100644 index f26258c6e4..0000000000 --- a/crate_universe/CONTRIBUTING.md +++ /dev/null @@ -1,35 +0,0 @@ -# Contributing - -## Tour of the codebase - -We start at `defs.bzl`, which invokes the resolver. - -The resolver: - -- `config.rs`: Deserializes the Config -- `parser.rs`: Parses the Config, any `Cargo.toml` files, and any additional packages, into a single unified `Cargo.toml` file -- `resolver.rs`: Resolves all of the crates. -- `consolidator.rs`: Patches in any WORKSPACE-specified overrides, and deals with platform-specific concerns. -- `renderer.rs`: Generates BUILD files for each crate, as well as functions that can be called from BUILD files. - -The code started off as a very hacky Week of Code project, and there are some clear remnants of that in the codebase - nothing is sacred, feel free to improve anything! - -Some areas have unit testing, there are a few (very brittle) integration tests, and some examples. - -## How to test local changes - -To use a local version, first bootstrap it. See [crate_universe/private/bootstrap/README.md](./private/bootstrap/README.md) for instructions on how to do this. - -This will build `crate_universe_resolver` and configure bazel to use the binary you just built. - -To get verbose logging, edit `defs.bzl` to set `RUST_LOG` to `debug` or `trace` instead of `info`. In particular, that will print out the generated `Cargo.toml`, and the path to the generated workspace file. - -Note that you may need to `bazel shutdown` between Bazel commands. Hopefully not, but if you're seeing stale results, try it out. This only affects local development. - -## Testing - -To test with the `resolver` built from source: - -```bash -bin/test -``` diff --git a/crate_universe/Cargo.Bazel.lock b/crate_universe/Cargo.Bazel.lock new file mode 100644 index 0000000000..2e894c15d1 --- /dev/null +++ b/crate_universe/Cargo.Bazel.lock @@ -0,0 +1,8022 @@ +{ + "checksum": "f8ab2b6622cba7bb41ac5eb5642bdfcb0bf5c1bd74c34e0245943b445b5c058c", + "crates": { + "aho-corasick 0.7.18": { + "name": "aho-corasick", + "version": "0.7.18", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/aho-corasick/0.7.18/download", + "sha256": "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "aho_corasick", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "aho_corasick", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.7.18" + }, + "license": "Unlicense/MIT" + }, + "anyhow 1.0.55": { + "name": "anyhow", + "version": "1.0.55", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anyhow/1.0.55/download", + "sha256": "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anyhow", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "anyhow", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "anyhow 1.0.55", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.55" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "atty 0.2.14": { + "name": "atty", + "version": "0.2.14", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/atty/0.2.14/download", + "sha256": "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "atty", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "atty", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_os = \"hermit\")": [ + { + "id": "hermit-abi 0.1.19", + "target": "hermit_abi" + } + ], + "cfg(unix)": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.2.14" + }, + "license": "MIT" + }, + "autocfg 1.1.0": { + "name": "autocfg", + "version": "1.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/autocfg/1.1.0/download", + "sha256": "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "autocfg", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "autocfg", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.1.0" + }, + "license": "Apache-2.0 OR MIT" + }, + "bitflags 1.3.2": { + "name": "bitflags", + "version": "1.3.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bitflags/1.3.2/download", + "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bitflags", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "bitflags", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2018", + "version": "1.3.2" + }, + "license": "MIT/Apache-2.0" + }, + "block-buffer 0.10.2": { + "name": "block-buffer", + "version": "0.10.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/block-buffer/0.10.2/download", + "sha256": "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" + } + }, + "targets": [ + { + "Library": { + "crate_name": "block_buffer", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "block_buffer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "generic-array 0.14.5", + "target": "generic_array" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.2" + }, + "license": "MIT OR Apache-2.0" + }, + "block-buffer 0.7.3": { + "name": "block-buffer", + "version": "0.7.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/block-buffer/0.7.3/download", + "sha256": "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "block_buffer", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "block_buffer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "block-padding 0.1.5", + "target": "block_padding" + }, + { + "id": "byte-tools 0.3.1", + "target": "byte_tools" + }, + { + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "generic-array 0.12.4", + "target": "generic_array" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.7.3" + }, + "license": "MIT OR Apache-2.0" + }, + "block-padding 0.1.5": { + "name": "block-padding", + "version": "0.1.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/block-padding/0.1.5/download", + "sha256": "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "block_padding", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "block_padding", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "byte-tools 0.3.1", + "target": "byte_tools" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.5" + }, + "license": "MIT OR Apache-2.0" + }, + "bstr 0.2.17": { + "name": "bstr", + "version": "0.2.17", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bstr/0.2.17/download", + "sha256": "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bstr", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "bstr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "std" + ], + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.17" + }, + "license": "MIT OR Apache-2.0" + }, + "byte-tools 0.3.1": { + "name": "byte-tools", + "version": "0.3.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/byte-tools/0.3.1/download", + "sha256": "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "byte_tools", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "byte_tools", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.3.1" + }, + "license": "MIT OR Apache-2.0" + }, + "byteorder 1.4.3": { + "name": "byteorder", + "version": "1.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/byteorder/1.4.3/download", + "sha256": "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + } + }, + "targets": [ + { + "Library": { + "crate_name": "byteorder", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "byteorder", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.4.3" + }, + "license": "Unlicense OR MIT" + }, + "camino 1.0.7": { + "name": "camino", + "version": "1.0.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/camino/1.0.7/download", + "sha256": "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" + } + }, + "targets": [ + { + "Library": { + "crate_name": "camino", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "camino", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "serde", + "serde1" + ], + "deps": { + "common": [ + { + "id": "camino 1.0.7", + "target": "build_script_build" + }, + { + "id": "serde 1.0.136", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.7" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "cargo-bazel 0.0.28": { + "name": "cargo-bazel", + "version": "0.0.28", + "repository": null, + "targets": [ + { + "Library": { + "crate_name": "cargo_bazel", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "Binary": { + "crate_name": "cargo-bazel", + "crate_root": "src/main.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cargo_bazel", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "cargo", + "default" + ], + "deps": { + "common": [ + { + "id": "anyhow 1.0.55", + "target": "anyhow" + }, + { + "id": "cargo-lock 7.0.1", + "target": "cargo_lock" + }, + { + "id": "cargo-platform 0.1.2", + "target": "cargo_platform" + }, + { + "id": "cargo_metadata 0.14.2", + "target": "cargo_metadata" + }, + { + "id": "cargo_toml 0.11.4", + "target": "cargo_toml" + }, + { + "id": "cfg-expr 0.10.2", + "target": "cfg_expr" + }, + { + "id": "clap 3.1.5", + "target": "clap" + }, + { + "id": "crates-index 0.18.7", + "target": "crates_index" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "pathdiff 0.2.1", + "target": "pathdiff" + }, + { + "id": "regex 1.5.4", + "target": "regex" + }, + { + "id": "semver 1.0.6", + "target": "semver" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + }, + { + "id": "sha2 0.10.2", + "target": "sha2" + }, + { + "id": "tempfile 3.3.0", + "target": "tempfile" + }, + { + "id": "tera 1.15.0", + "target": "tera" + }, + { + "id": "textwrap 0.14.2", + "target": "textwrap" + }, + { + "id": "toml 0.5.8", + "target": "toml" + } + ], + "selects": {} + }, + "deps_dev": { + "common": [ + { + "id": "spectral 0.6.0", + "target": "spectral" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.0.28" + }, + "license": null + }, + "cargo-lock 7.0.1": { + "name": "cargo-lock", + "version": "7.0.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cargo-lock/7.0.1/download", + "sha256": "7fb04b88bd5b2036e30704f95c6ee16f3b5ca3b4ca307da2889d9006648e5c88" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cargo_lock", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "Binary": { + "crate_name": "cargo-lock", + "crate_root": "src/bin/cargo-lock/main.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cargo_lock", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "semver 1.0.6", + "target": "semver" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "toml 0.5.8", + "target": "toml" + }, + { + "id": "url 2.2.2", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "7.0.1" + }, + "license": "Apache-2.0 OR MIT" + }, + "cargo-platform 0.1.2": { + "name": "cargo-platform", + "version": "0.1.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cargo-platform/0.1.2/download", + "sha256": "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cargo_platform", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cargo_platform", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.2" + }, + "license": "MIT OR Apache-2.0" + }, + "cargo_metadata 0.14.2": { + "name": "cargo_metadata", + "version": "0.14.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cargo_metadata/0.14.2/download", + "sha256": "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cargo_metadata", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cargo_metadata", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "camino 1.0.7", + "target": "camino" + }, + { + "id": "cargo-platform 0.1.2", + "target": "cargo_platform" + }, + { + "id": "semver 1.0.6", + "target": "semver" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.14.2" + }, + "license": "MIT" + }, + "cargo_toml 0.11.4": { + "name": "cargo_toml", + "version": "0.11.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cargo_toml/0.11.4/download", + "sha256": "4e270ef0cd868745878982f7ce470aa898d0d4bb248af67f0cf66f54617913ef" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cargo_toml", + "crate_root": "src/cargo_toml.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cargo_toml", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "toml 0.5.8", + "target": "toml" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "serde_derive 1.0.136", + "target": "serde_derive" + } + ], + "selects": {} + }, + "version": "0.11.4" + }, + "license": "Apache-2.0 OR MIT" + }, + "cc 1.0.73": { + "name": "cc", + "version": "1.0.73", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cc/1.0.73/download", + "sha256": "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cc", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "Binary": { + "crate_name": "gcc-shim", + "crate_root": "src/bin/gcc-shim.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "jobserver", + "parallel" + ], + "deps": { + "common": [ + { + "id": "jobserver 0.1.24", + "target": "jobserver" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.73" + }, + "license": "MIT/Apache-2.0" + }, + "cfg-expr 0.10.2": { + "name": "cfg-expr", + "version": "0.10.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cfg-expr/0.10.2/download", + "sha256": "5e068cb2806bbc15b439846dc16c5f89f8599f2c3e4d73d4449d38f9b2f0b6c5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cfg_expr", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cfg_expr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "smallvec 1.8.0", + "target": "smallvec" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.2" + }, + "license": "MIT OR Apache-2.0" + }, + "cfg-if 1.0.0": { + "name": "cfg-if", + "version": "1.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cfg-if/1.0.0/download", + "sha256": "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cfg_if", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cfg_if", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.0" + }, + "license": "MIT/Apache-2.0" + }, + "chrono 0.4.19": { + "name": "chrono", + "version": "0.4.19", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/chrono/0.4.19/download", + "sha256": "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" + } + }, + "targets": [ + { + "Library": { + "crate_name": "chrono", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "chrono", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "clock", + "libc", + "std", + "winapi" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.119", + "target": "libc" + }, + { + "id": "num-integer 0.1.44", + "target": "num_integer" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.4.19" + }, + "license": "MIT/Apache-2.0" + }, + "chrono-tz 0.6.1": { + "name": "chrono-tz", + "version": "0.6.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/chrono-tz/0.6.1/download", + "sha256": "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552" + } + }, + "targets": [ + { + "Library": { + "crate_name": "chrono_tz", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "chrono_tz", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "chrono 0.4.19", + "target": "chrono" + }, + { + "id": "chrono-tz 0.6.1", + "target": "build_script_build" + }, + { + "id": "phf 0.10.1", + "target": "phf" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.6.1" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "chrono-tz-build 0.0.2", + "target": "chrono_tz_build" + } + ], + "selects": {} + } + }, + "license": "MIT/Apache-2.0" + }, + "chrono-tz-build 0.0.2": { + "name": "chrono-tz-build", + "version": "0.0.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/chrono-tz-build/0.0.2/download", + "sha256": "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069" + } + }, + "targets": [ + { + "Library": { + "crate_name": "chrono_tz_build", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "chrono_tz_build", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "parse-zoneinfo 0.3.0", + "target": "parse_zoneinfo" + }, + { + "id": "phf 0.10.1", + "target": "phf" + }, + { + "id": "phf_codegen 0.10.0", + "target": "phf_codegen" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.0.2" + }, + "license": "MIT/Apache-2.0" + }, + "clap 3.1.5": { + "name": "clap", + "version": "3.1.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap/3.1.5/download", + "sha256": "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "clap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "atty", + "clap_derive", + "color", + "default", + "derive", + "env", + "lazy_static", + "std", + "strsim", + "suggestions", + "termcolor" + ], + "deps": { + "common": [ + { + "id": "atty 0.2.14", + "target": "atty" + }, + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "indexmap 1.8.0", + "target": "indexmap" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "os_str_bytes 6.0.0", + "target": "os_str_bytes" + }, + { + "id": "strsim 0.10.0", + "target": "strsim" + }, + { + "id": "termcolor 1.1.3", + "target": "termcolor" + }, + { + "id": "textwrap 0.15.0", + "target": "textwrap" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "clap_derive 3.1.4", + "target": "clap_derive" + } + ], + "selects": {} + }, + "version": "3.1.5" + }, + "license": "MIT OR Apache-2.0" + }, + "clap_derive 3.1.4": { + "name": "clap_derive", + "version": "3.1.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap_derive/3.1.4/download", + "sha256": "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "clap_derive", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "clap_derive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "heck 0.4.0", + "target": "heck" + }, + { + "id": "proc-macro-error 1.0.4", + "target": "proc_macro_error" + }, + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + }, + { + "id": "syn 1.0.86", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "3.1.4" + }, + "license": "MIT OR Apache-2.0" + }, + "cpufeatures 0.2.1": { + "name": "cpufeatures", + "version": "0.2.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cpufeatures/0.2.1/download", + "sha256": "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cpufeatures", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "cpufeatures", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "aarch64-apple-darwin": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ] + } + }, + "edition": "2018", + "version": "0.2.1" + }, + "license": "MIT OR Apache-2.0" + }, + "crates-index 0.18.7": { + "name": "crates-index", + "version": "0.18.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crates-index/0.18.7/download", + "sha256": "0044896374c388ccbf1497dad6384bf6111dbcad9d7069506df7450ce9b62ea3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crates_index", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "crates_index", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "git2 0.14.1", + "target": "git2" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "home 0.5.3", + "target": "home" + }, + { + "id": "memchr 2.4.1", + "target": "memchr" + }, + { + "id": "num_cpus 1.13.1", + "target": "num_cpus" + }, + { + "id": "rustc-hash 1.1.0", + "target": "rustc_hash" + }, + { + "id": "semver 1.0.6", + "target": "semver" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + }, + { + "id": "smartstring 1.0.0", + "target": "smartstring" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "serde_derive 1.0.136", + "target": "serde_derive" + } + ], + "selects": {} + }, + "version": "0.18.7" + }, + "license": "Apache-2.0" + }, + "cross_installer 0.1.0": { + "name": "cross_installer", + "version": "0.1.0", + "repository": null, + "targets": [ + { + "Binary": { + "crate_name": "cross_installer", + "crate_root": "src/main.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": null, + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "clap 3.1.5", + "target": "clap" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": null + }, + "crossbeam-utils 0.8.7": { + "name": "crossbeam-utils", + "version": "0.8.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-utils/0.8.7/download", + "sha256": "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_utils", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "crossbeam_utils", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "lazy_static", + "std" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-utils 0.8.7", + "target": "build_script_build" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.8.7" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "crypto-common 0.1.3": { + "name": "crypto-common", + "version": "0.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crypto-common/0.1.3/download", + "sha256": "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crypto_common", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "crypto_common", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "std" + ], + "deps": { + "common": [ + { + "id": "generic-array 0.14.5", + "target": "generic_array" + }, + { + "id": "typenum 1.15.0", + "target": "typenum" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.3" + }, + "license": "MIT OR Apache-2.0" + }, + "deunicode 0.4.3": { + "name": "deunicode", + "version": "0.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/deunicode/0.4.3/download", + "sha256": "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" + } + }, + "targets": [ + { + "Library": { + "crate_name": "deunicode", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "deunicode", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.4.3" + }, + "license": "BSD-3-Clause" + }, + "digest 0.10.3": { + "name": "digest", + "version": "0.10.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/digest/0.10.3/download", + "sha256": "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" + } + }, + "targets": [ + { + "Library": { + "crate_name": "digest", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "digest", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "block-buffer", + "core-api", + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "block-buffer 0.10.2", + "target": "block_buffer" + }, + { + "id": "crypto-common 0.1.3", + "target": "crypto_common" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.3" + }, + "license": "MIT OR Apache-2.0" + }, + "digest 0.8.1": { + "name": "digest", + "version": "0.8.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/digest/0.8.1/download", + "sha256": "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "digest", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "digest", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "generic-array 0.12.4", + "target": "generic_array" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.8.1" + }, + "license": "MIT OR Apache-2.0" + }, + "fake-simd 0.1.2": { + "name": "fake-simd", + "version": "0.1.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/fake-simd/0.1.2/download", + "sha256": "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + } + }, + "targets": [ + { + "Library": { + "crate_name": "fake_simd", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "fake_simd", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.2" + }, + "license": "MIT/Apache-2.0" + }, + "fastrand 1.7.0": { + "name": "fastrand", + "version": "1.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/fastrand/1.7.0/download", + "sha256": "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" + } + }, + "targets": [ + { + "Library": { + "crate_name": "fastrand", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "fastrand", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_arch = \"wasm32\")": [ + { + "id": "instant 0.1.12", + "target": "instant" + } + ] + } + }, + "edition": "2018", + "version": "1.7.0" + }, + "license": "Apache-2.0 OR MIT" + }, + "fnv 1.0.7": { + "name": "fnv", + "version": "1.0.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/fnv/1.0.7/download", + "sha256": "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "fnv", + "crate_root": "lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "fnv", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2015", + "version": "1.0.7" + }, + "license": "Apache-2.0 / MIT" + }, + "form_urlencoded 1.0.1": { + "name": "form_urlencoded", + "version": "1.0.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/form_urlencoded/1.0.1/download", + "sha256": "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" + } + }, + "targets": [ + { + "Library": { + "crate_name": "form_urlencoded", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "form_urlencoded", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "matches 0.1.9", + "target": "matches" + }, + { + "id": "percent-encoding 2.1.0", + "target": "percent_encoding" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.1" + }, + "license": "MIT/Apache-2.0" + }, + "fuchsia-cprng 0.1.1": { + "name": "fuchsia-cprng", + "version": "0.1.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/fuchsia-cprng/0.1.1/download", + "sha256": "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + } + }, + "targets": [ + { + "Library": { + "crate_name": "fuchsia_cprng", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "fuchsia_cprng", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.1.1" + }, + "license": null + }, + "generic-array 0.12.4": { + "name": "generic-array", + "version": "0.12.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/generic-array/0.12.4/download", + "sha256": "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "generic_array", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "generic_array", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "typenum 1.15.0", + "target": "typenum" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.12.4" + }, + "license": "MIT" + }, + "generic-array 0.14.5": { + "name": "generic-array", + "version": "0.14.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/generic-array/0.14.5/download", + "sha256": "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" + } + }, + "targets": [ + { + "Library": { + "crate_name": "generic_array", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "generic_array", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "more_lengths" + ], + "deps": { + "common": [ + { + "id": "generic-array 0.14.5", + "target": "build_script_build" + }, + { + "id": "typenum 1.15.0", + "target": "typenum" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.14.5" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "version_check 0.9.4", + "target": "version_check" + } + ], + "selects": {} + } + }, + "license": "MIT" + }, + "getrandom 0.2.5": { + "name": "getrandom", + "version": "0.2.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/getrandom/0.2.5/download", + "sha256": "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" + } + }, + "targets": [ + { + "Library": { + "crate_name": "getrandom", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "getrandom", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "std" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + } + ], + "selects": { + "cfg(target_os = \"wasi\")": [ + { + "id": "wasi 0.10.2+wasi-snapshot-preview1", + "target": "wasi" + } + ], + "cfg(unix)": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ] + } + }, + "edition": "2018", + "version": "0.2.5" + }, + "license": "MIT OR Apache-2.0" + }, + "git2 0.14.1": { + "name": "git2", + "version": "0.14.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/git2/0.14.1/download", + "sha256": "6e7d3b96ec1fcaa8431cf04a4f1ef5caafe58d5cf7bcc31f09c1626adddb0ffe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "git2", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "git2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "libc 0.2.119", + "target": "libc" + }, + { + "id": "libgit2-sys 0.13.1+1.4.2", + "target": "libgit2_sys" + }, + { + "id": "log 0.4.14", + "target": "log" + }, + { + "id": "url 2.2.2", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.14.1" + }, + "license": "MIT/Apache-2.0" + }, + "globset 0.4.8": { + "name": "globset", + "version": "0.4.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/globset/0.4.8/download", + "sha256": "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "globset", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "globset", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "aho-corasick 0.7.18", + "target": "aho_corasick" + }, + { + "id": "bstr 0.2.17", + "target": "bstr" + }, + { + "id": "fnv 1.0.7", + "target": "fnv" + }, + { + "id": "log 0.4.14", + "target": "log" + }, + { + "id": "regex 1.5.4", + "target": "regex" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.4.8" + }, + "license": "Unlicense/MIT" + }, + "globwalk 0.8.1": { + "name": "globwalk", + "version": "0.8.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/globwalk/0.8.1/download", + "sha256": "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "globwalk", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "globwalk", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "ignore 0.4.18", + "target": "ignore" + }, + { + "id": "walkdir 2.3.2", + "target": "walkdir" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.8.1" + }, + "license": "MIT" + }, + "hashbrown 0.11.2": { + "name": "hashbrown", + "version": "0.11.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hashbrown/0.11.2/download", + "sha256": "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hashbrown", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "hashbrown", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "raw" + ], + "edition": "2018", + "version": "0.11.2" + }, + "license": "Apache-2.0/MIT" + }, + "heck 0.4.0": { + "name": "heck", + "version": "0.4.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/heck/0.4.0/download", + "sha256": "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "heck", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "heck", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2018", + "version": "0.4.0" + }, + "license": "MIT OR Apache-2.0" + }, + "hermit-abi 0.1.19": { + "name": "hermit-abi", + "version": "0.1.19", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hermit-abi/0.1.19/download", + "sha256": "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hermit_abi", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "hermit_abi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.19" + }, + "license": "MIT/Apache-2.0" + }, + "hex 0.4.3": { + "name": "hex", + "version": "0.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hex/0.4.3/download", + "sha256": "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hex", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "hex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "default", + "serde", + "std" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.4.3" + }, + "license": "MIT OR Apache-2.0" + }, + "home 0.5.3": { + "name": "home", + "version": "0.5.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/home/0.5.3/download", + "sha256": "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654" + } + }, + "targets": [ + { + "Library": { + "crate_name": "home", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "home", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.5.3" + }, + "license": "MIT OR Apache-2.0" + }, + "humansize 1.1.1": { + "name": "humansize", + "version": "1.1.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/humansize/1.1.1/download", + "sha256": "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" + } + }, + "targets": [ + { + "Library": { + "crate_name": "humansize", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "humansize", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.1.1" + }, + "license": "MIT/Apache-2.0" + }, + "idna 0.2.3": { + "name": "idna", + "version": "0.2.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/idna/0.2.3/download", + "sha256": "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "idna", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "idna", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "matches 0.1.9", + "target": "matches" + }, + { + "id": "unicode-bidi 0.3.7", + "target": "unicode_bidi" + }, + { + "id": "unicode-normalization 0.1.19", + "target": "unicode_normalization" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.3" + }, + "license": "MIT/Apache-2.0" + }, + "ignore 0.4.18": { + "name": "ignore", + "version": "0.4.18", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ignore/0.4.18/download", + "sha256": "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ignore", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "ignore", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "crossbeam-utils 0.8.7", + "target": "crossbeam_utils" + }, + { + "id": "globset 0.4.8", + "target": "globset" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "log 0.4.14", + "target": "log" + }, + { + "id": "memchr 2.4.1", + "target": "memchr" + }, + { + "id": "regex 1.5.4", + "target": "regex" + }, + { + "id": "same-file 1.0.6", + "target": "same_file" + }, + { + "id": "thread_local 1.1.4", + "target": "thread_local" + }, + { + "id": "walkdir 2.3.2", + "target": "walkdir" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "winapi-util 0.1.5", + "target": "winapi_util" + } + ] + } + }, + "edition": "2018", + "version": "0.4.18" + }, + "license": "Unlicense/MIT" + }, + "indexmap 1.8.0": { + "name": "indexmap", + "version": "1.8.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/indexmap/1.8.0/download", + "sha256": "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" + } + }, + "targets": [ + { + "Library": { + "crate_name": "indexmap", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "indexmap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "std" + ], + "deps": { + "common": [ + { + "id": "hashbrown 0.11.2", + "target": "hashbrown" + }, + { + "id": "indexmap 1.8.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.8.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "Apache-2.0/MIT" + }, + "instant 0.1.12": { + "name": "instant", + "version": "0.1.12", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/instant/0.1.12/download", + "sha256": "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "instant", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "instant", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.12" + }, + "license": "BSD-3-Clause" + }, + "itoa 1.0.1": { + "name": "itoa", + "version": "1.0.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/itoa/1.0.1/download", + "sha256": "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + } + }, + "targets": [ + { + "Library": { + "crate_name": "itoa", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "itoa", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.1" + }, + "license": "MIT OR Apache-2.0" + }, + "jobserver 0.1.24": { + "name": "jobserver", + "version": "0.1.24", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/jobserver/0.1.24/download", + "sha256": "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "jobserver", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "jobserver", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(unix)": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ] + } + }, + "edition": "2018", + "version": "0.1.24" + }, + "license": "MIT/Apache-2.0" + }, + "lazy_static 1.4.0": { + "name": "lazy_static", + "version": "1.4.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/lazy_static/1.4.0/download", + "sha256": "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + } + }, + "targets": [ + { + "Library": { + "crate_name": "lazy_static", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "lazy_static", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.4.0" + }, + "license": "MIT/Apache-2.0" + }, + "libc 0.2.119": { + "name": "libc", + "version": "0.2.119", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/libc/0.2.119/download", + "sha256": "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libc", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "libc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.119", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.119" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "libgit2-sys 0.13.1+1.4.2": { + "name": "libgit2-sys", + "version": "0.13.1+1.4.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/libgit2-sys/0.13.1+1.4.2/download", + "sha256": "43e598aa7a4faedf1ea1b4608f582b06f0f40211eec551b7ef36019ae3f62def" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libgit2_sys", + "crate_root": "lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "libgit2_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.119", + "target": "libc" + }, + { + "id": "libz-sys 1.1.3", + "target": "libz_sys" + } + ], + "selects": {} + }, + "extra_deps": [ + "@libgit2" + ], + "edition": "2018", + "version": "0.13.1+1.4.2" + }, + "license": "MIT/Apache-2.0" + }, + "libz-sys 1.1.3": { + "name": "libz-sys", + "version": "1.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/libz-sys/1.1.3/download", + "sha256": "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libz_sys", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "libz_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "libc" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "selects": {} + }, + "extra_deps": [ + "@zlib" + ], + "edition": "2015", + "version": "1.1.3" + }, + "license": "MIT OR Apache-2.0" + }, + "log 0.4.14": { + "name": "log", + "version": "0.4.14", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/log/0.4.14/download", + "sha256": "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" + } + }, + "targets": [ + { + "Library": { + "crate_name": "log", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "log", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "log 0.4.14", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.14" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "maplit 1.0.2": { + "name": "maplit", + "version": "1.0.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/maplit/1.0.2/download", + "sha256": "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "maplit", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "maplit", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.0.2" + }, + "license": "MIT/Apache-2.0" + }, + "matches 0.1.9": { + "name": "matches", + "version": "0.1.9", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/matches/0.1.9/download", + "sha256": "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "matches", + "crate_root": "lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "matches", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.9" + }, + "license": "MIT" + }, + "memchr 2.4.1": { + "name": "memchr", + "version": "2.4.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/memchr/2.4.1/download", + "sha256": "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "memchr", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "memchr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "2.4.1" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "Unlicense/MIT" + }, + "num 0.1.42": { + "name": "num", + "version": "0.1.42", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num/0.1.42/download", + "sha256": "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "bigint", + "complex", + "default", + "num-bigint", + "num-complex", + "num-rational", + "rational", + "rustc-serialize" + ], + "deps": { + "common": [ + { + "id": "num-bigint 0.1.44", + "target": "num_bigint" + }, + { + "id": "num-complex 0.1.43", + "target": "num_complex" + }, + { + "id": "num-integer 0.1.44", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.42", + "target": "num_iter" + }, + { + "id": "num-rational 0.1.42", + "target": "num_rational" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.42" + }, + "license": "MIT/Apache-2.0" + }, + "num-bigint 0.1.44": { + "name": "num-bigint", + "version": "0.1.44", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-bigint/0.1.44/download", + "sha256": "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_bigint", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_bigint", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "rand", + "rustc-serialize" + ], + "deps": { + "common": [ + { + "id": "num-integer 0.1.44", + "target": "num_integer" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + }, + { + "id": "rand 0.4.6", + "target": "rand" + }, + { + "id": "rustc-serialize 0.3.24", + "target": "rustc_serialize" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.44" + }, + "license": "MIT/Apache-2.0" + }, + "num-complex 0.1.43": { + "name": "num-complex", + "version": "0.1.43", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-complex/0.1.43/download", + "sha256": "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_complex", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_complex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "rustc-serialize" + ], + "deps": { + "common": [ + { + "id": "num-traits 0.2.14", + "target": "num_traits" + }, + { + "id": "rustc-serialize 0.3.24", + "target": "rustc_serialize" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.43" + }, + "license": "MIT/Apache-2.0" + }, + "num-integer 0.1.44": { + "name": "num-integer", + "version": "0.1.44", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-integer/0.1.44/download", + "sha256": "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_integer", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_integer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "num-integer 0.1.44", + "target": "build_script_build" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.44" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "num-iter 0.1.42": { + "name": "num-iter", + "version": "0.1.42", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-iter/0.1.42/download", + "sha256": "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_iter", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_iter", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "num-integer 0.1.44", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.42", + "target": "build_script_build" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.42" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "num-rational 0.1.42": { + "name": "num-rational", + "version": "0.1.42", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-rational/0.1.42/download", + "sha256": "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_rational", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_rational", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "bigint", + "default", + "num-bigint", + "rustc-serialize" + ], + "deps": { + "common": [ + { + "id": "num-bigint 0.1.44", + "target": "num_bigint" + }, + { + "id": "num-integer 0.1.44", + "target": "num_integer" + }, + { + "id": "num-traits 0.2.14", + "target": "num_traits" + }, + { + "id": "rustc-serialize 0.3.24", + "target": "rustc_serialize" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.42" + }, + "license": "MIT/Apache-2.0" + }, + "num-traits 0.2.14": { + "name": "num-traits", + "version": "0.2.14", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-traits/0.2.14/download", + "sha256": "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_traits", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_traits", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "num-traits 0.2.14", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.14" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "num_cpus 1.13.1": { + "name": "num_cpus", + "version": "1.13.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num_cpus/1.13.1/download", + "sha256": "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_cpus", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "num_cpus", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [ + { + "id": "hermit-abi 0.1.19", + "target": "hermit_abi" + } + ], + "cfg(not(windows))": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ] + } + }, + "edition": "2015", + "version": "1.13.1" + }, + "license": "MIT OR Apache-2.0" + }, + "once_cell 1.9.0": { + "name": "once_cell", + "version": "1.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/once_cell/1.9.0/download", + "sha256": "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "once_cell", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "once_cell", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "default", + "race", + "std" + ], + "edition": "2018", + "version": "1.9.0" + }, + "license": "MIT OR Apache-2.0" + }, + "opaque-debug 0.2.3": { + "name": "opaque-debug", + "version": "0.2.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/opaque-debug/0.2.3/download", + "sha256": "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "opaque_debug", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "opaque_debug", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.2.3" + }, + "license": "MIT OR Apache-2.0" + }, + "os_str_bytes 6.0.0": { + "name": "os_str_bytes", + "version": "6.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/os_str_bytes/6.0.0/download", + "sha256": "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" + } + }, + "targets": [ + { + "Library": { + "crate_name": "os_str_bytes", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "os_str_bytes", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "memchr", + "raw_os_str" + ], + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "6.0.0" + }, + "license": "MIT OR Apache-2.0" + }, + "parse-zoneinfo 0.3.0": { + "name": "parse-zoneinfo", + "version": "0.3.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/parse-zoneinfo/0.3.0/download", + "sha256": "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" + } + }, + "targets": [ + { + "Library": { + "crate_name": "parse_zoneinfo", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "parse_zoneinfo", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "regex 1.5.4", + "target": "regex" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.3.0" + }, + "license": "MIT" + }, + "pathdiff 0.2.1": { + "name": "pathdiff", + "version": "0.2.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pathdiff/0.2.1/download", + "sha256": "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pathdiff", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pathdiff", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.2.1" + }, + "license": "MIT/Apache-2.0" + }, + "percent-encoding 2.1.0": { + "name": "percent-encoding", + "version": "2.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/percent-encoding/2.1.0/download", + "sha256": "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "percent_encoding", + "crate_root": "lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "percent_encoding", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "2.1.0" + }, + "license": "MIT/Apache-2.0" + }, + "pest 2.1.3": { + "name": "pest", + "version": "2.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pest/2.1.3/download", + "sha256": "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pest", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pest", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "ucd-trie 0.1.3", + "target": "ucd_trie" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "2.1.3" + }, + "license": "MIT/Apache-2.0" + }, + "pest_derive 2.1.0": { + "name": "pest_derive", + "version": "2.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pest_derive/2.1.0/download", + "sha256": "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "pest_derive", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pest_derive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "pest 2.1.3", + "target": "pest" + }, + { + "id": "pest_generator 2.1.3", + "target": "pest_generator" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "2.1.0" + }, + "license": "MIT/Apache-2.0" + }, + "pest_generator 2.1.3": { + "name": "pest_generator", + "version": "2.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pest_generator/2.1.3/download", + "sha256": "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pest_generator", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pest_generator", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "pest 2.1.3", + "target": "pest" + }, + { + "id": "pest_meta 2.1.3", + "target": "pest_meta" + }, + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + }, + { + "id": "syn 1.0.86", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "2.1.3" + }, + "license": "MIT/Apache-2.0" + }, + "pest_meta 2.1.3": { + "name": "pest_meta", + "version": "2.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pest_meta/2.1.3/download", + "sha256": "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pest_meta", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pest_meta", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "maplit 1.0.2", + "target": "maplit" + }, + { + "id": "pest 2.1.3", + "target": "pest" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "2.1.3" + }, + "license": "MIT/Apache-2.0" + }, + "phf 0.10.1": { + "name": "phf", + "version": "0.10.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/phf/0.10.1/download", + "sha256": "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" + } + }, + "targets": [ + { + "Library": { + "crate_name": "phf", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "phf", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "uncased" + ], + "deps": { + "common": [ + { + "id": "phf_shared 0.10.0", + "target": "phf_shared" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.1" + }, + "license": "MIT" + }, + "phf_codegen 0.10.0": { + "name": "phf_codegen", + "version": "0.10.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/phf_codegen/0.10.0/download", + "sha256": "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "phf_codegen", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "phf_codegen", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "phf_generator 0.10.0", + "target": "phf_generator" + }, + { + "id": "phf_shared 0.10.0", + "target": "phf_shared" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.0" + }, + "license": "MIT" + }, + "phf_generator 0.10.0": { + "name": "phf_generator", + "version": "0.10.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/phf_generator/0.10.0/download", + "sha256": "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "phf_generator", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "Binary": { + "crate_name": "gen_hash_test", + "crate_root": "src/bin/gen_hash_test.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "phf_generator", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "phf_shared 0.10.0", + "target": "phf_shared" + }, + { + "id": "rand 0.8.5", + "target": "rand" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.0" + }, + "license": "MIT" + }, + "phf_shared 0.10.0": { + "name": "phf_shared", + "version": "0.10.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/phf_shared/0.10.0/download", + "sha256": "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" + } + }, + "targets": [ + { + "Library": { + "crate_name": "phf_shared", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "phf_shared", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std", + "uncased" + ], + "deps": { + "common": [ + { + "id": "siphasher 0.3.9", + "target": "siphasher" + }, + { + "id": "uncased 0.9.6", + "target": "uncased" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.0" + }, + "license": "MIT" + }, + "pkg-config 0.3.24": { + "name": "pkg-config", + "version": "0.3.24", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pkg-config/0.3.24/download", + "sha256": "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pkg_config", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "pkg_config", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.3.24" + }, + "license": "MIT/Apache-2.0" + }, + "ppv-lite86 0.2.16": { + "name": "ppv-lite86", + "version": "0.2.16", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ppv-lite86/0.2.16/download", + "sha256": "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ppv_lite86", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "ppv_lite86", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "simd", + "std" + ], + "edition": "2018", + "version": "0.2.16" + }, + "license": "MIT/Apache-2.0" + }, + "proc-macro-error 1.0.4": { + "name": "proc-macro-error", + "version": "1.0.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/proc-macro-error/1.0.4/download", + "sha256": "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "proc_macro_error", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "proc_macro_error", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "syn", + "syn-error" + ], + "deps": { + "common": [ + { + "id": "proc-macro-error 1.0.4", + "target": "build_script_build" + }, + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + }, + { + "id": "syn 1.0.86", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "proc-macro-error-attr 1.0.4", + "target": "proc_macro_error_attr" + } + ], + "selects": {} + }, + "version": "1.0.4" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "version_check 0.9.4", + "target": "version_check" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "proc-macro-error-attr 1.0.4": { + "name": "proc-macro-error-attr", + "version": "1.0.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/proc-macro-error-attr/1.0.4/download", + "sha256": "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "proc_macro_error_attr", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "proc_macro_error_attr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro-error-attr 1.0.4", + "target": "build_script_build" + }, + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.4" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "version_check 0.9.4", + "target": "version_check" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "proc-macro2 1.0.36": { + "name": "proc-macro2", + "version": "1.0.36", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/proc-macro2/1.0.36/download", + "sha256": "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" + } + }, + "targets": [ + { + "Library": { + "crate_name": "proc_macro2", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "proc_macro2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "proc-macro" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.36", + "target": "build_script_build" + }, + { + "id": "unicode-xid 0.2.2", + "target": "unicode_xid" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.36" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "quote 1.0.15": { + "name": "quote", + "version": "1.0.15", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/quote/1.0.15/download", + "sha256": "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" + } + }, + "targets": [ + { + "Library": { + "crate_name": "quote", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "quote", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "proc-macro" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.15" + }, + "license": "MIT OR Apache-2.0" + }, + "rand 0.4.6": { + "name": "rand", + "version": "0.4.6", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand/0.4.6/download", + "sha256": "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "libc", + "std" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_env = \"sgx\")": [ + { + "id": "rand_core 0.3.1", + "target": "rand_core" + }, + { + "id": "rdrand 0.4.0", + "target": "rdrand" + } + ], + "cfg(target_os = \"fuchsia\")": [ + { + "id": "fuchsia-cprng 0.1.1", + "target": "fuchsia_cprng" + } + ], + "cfg(unix)": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.4.6" + }, + "license": "MIT/Apache-2.0" + }, + "rand 0.8.5": { + "name": "rand", + "version": "0.8.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand/0.8.5/download", + "sha256": "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "default", + "getrandom", + "libc", + "rand_chacha", + "small_rng", + "std", + "std_rng" + ], + "deps": { + "common": [ + { + "id": "rand_chacha 0.3.1", + "target": "rand_chacha" + }, + { + "id": "rand_core 0.6.3", + "target": "rand_core" + } + ], + "selects": { + "cfg(unix)": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ] + } + }, + "edition": "2018", + "version": "0.8.5" + }, + "license": "MIT OR Apache-2.0" + }, + "rand_chacha 0.3.1": { + "name": "rand_chacha", + "version": "0.3.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand_chacha/0.3.1/download", + "sha256": "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand_chacha", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand_chacha", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "std" + ], + "deps": { + "common": [ + { + "id": "ppv-lite86 0.2.16", + "target": "ppv_lite86" + }, + { + "id": "rand_core 0.6.3", + "target": "rand_core" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.3.1" + }, + "license": "MIT OR Apache-2.0" + }, + "rand_core 0.3.1": { + "name": "rand_core", + "version": "0.3.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand_core/0.3.1/download", + "sha256": "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand_core", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "rand_core 0.4.2", + "target": "rand_core" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.3.1" + }, + "license": "MIT/Apache-2.0" + }, + "rand_core 0.4.2": { + "name": "rand_core", + "version": "0.4.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand_core/0.4.2/download", + "sha256": "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand_core", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.4.2" + }, + "license": "MIT/Apache-2.0" + }, + "rand_core 0.6.3": { + "name": "rand_core", + "version": "0.6.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rand_core/0.6.3/download", + "sha256": "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rand_core", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rand_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "getrandom", + "std" + ], + "deps": { + "common": [ + { + "id": "getrandom 0.2.5", + "target": "getrandom" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.6.3" + }, + "license": "MIT OR Apache-2.0" + }, + "rdrand 0.4.0": { + "name": "rdrand", + "version": "0.4.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rdrand/0.4.0/download", + "sha256": "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rdrand", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rdrand", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "rand_core 0.3.1", + "target": "rand_core" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "license": "ISC" + }, + "redox_syscall 0.2.11": { + "name": "redox_syscall", + "version": "0.2.11", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/redox_syscall/0.2.11/download", + "sha256": "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "syscall", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "syscall", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bitflags 1.3.2", + "target": "bitflags" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.11" + }, + "license": "MIT" + }, + "regex 1.5.4": { + "name": "regex", + "version": "1.5.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex/1.5.4/download", + "sha256": "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "regex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "aho-corasick", + "default", + "memchr", + "perf", + "perf-cache", + "perf-dfa", + "perf-inline", + "perf-literal", + "std", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "deps": { + "common": [ + { + "id": "aho-corasick 0.7.18", + "target": "aho_corasick" + }, + { + "id": "memchr 2.4.1", + "target": "memchr" + }, + { + "id": "regex-syntax 0.6.25", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.5.4" + }, + "license": "MIT OR Apache-2.0" + }, + "regex-syntax 0.6.25": { + "name": "regex-syntax", + "version": "0.6.25", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-syntax/0.6.25/download", + "sha256": "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_syntax", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "regex_syntax", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "edition": "2018", + "version": "0.6.25" + }, + "license": "MIT/Apache-2.0" + }, + "remove_dir_all 0.5.3": { + "name": "remove_dir_all", + "version": "0.5.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/remove_dir_all/0.5.3/download", + "sha256": "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "remove_dir_all", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "remove_dir_all", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.5.3" + }, + "license": "MIT/Apache-2.0" + }, + "rustc-hash 1.1.0": { + "name": "rustc-hash", + "version": "1.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rustc-hash/1.1.0/download", + "sha256": "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rustc_hash", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rustc_hash", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2015", + "version": "1.1.0" + }, + "license": "Apache-2.0/MIT" + }, + "rustc-serialize 0.3.24": { + "name": "rustc-serialize", + "version": "0.3.24", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rustc-serialize/0.3.24/download", + "sha256": "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rustc_serialize", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "rustc_serialize", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.3.24" + }, + "license": "MIT/Apache-2.0" + }, + "ryu 1.0.9": { + "name": "ryu", + "version": "1.0.9", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ryu/1.0.9/download", + "sha256": "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ryu", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "ryu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.9" + }, + "license": "Apache-2.0 OR BSL-1.0" + }, + "same-file 1.0.6": { + "name": "same-file", + "version": "1.0.6", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/same-file/1.0.6/download", + "sha256": "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" + } + }, + "targets": [ + { + "Library": { + "crate_name": "same_file", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "same_file", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi-util 0.1.5", + "target": "winapi_util" + } + ] + } + }, + "edition": "2018", + "version": "1.0.6" + }, + "license": "Unlicense/MIT" + }, + "semver 1.0.6": { + "name": "semver", + "version": "1.0.6", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/semver/1.0.6/download", + "sha256": "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "semver", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "semver", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "serde", + "std" + ], + "deps": { + "common": [ + { + "id": "semver 1.0.6", + "target": "build_script_build" + }, + { + "id": "serde 1.0.136", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.6" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "serde 1.0.136": { + "name": "serde", + "version": "1.0.136", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde/1.0.136/download", + "sha256": "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "serde", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "derive", + "rc", + "serde_derive", + "std" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "proc_macro_deps": { + "common": [ + { + "id": "serde_derive 1.0.136", + "target": "serde_derive" + } + ], + "selects": {} + }, + "version": "1.0.136" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "serde_derive 1.0.136": { + "name": "serde_derive", + "version": "1.0.136", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_derive/1.0.136/download", + "sha256": "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "serde_derive", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "serde_derive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + }, + { + "id": "serde_derive 1.0.136", + "target": "build_script_build" + }, + { + "id": "syn 1.0.86", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.0.136" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "serde_json 1.0.79": { + "name": "serde_json", + "version": "1.0.79", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_json/1.0.79/download", + "sha256": "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde_json", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "serde_json", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std", + "unbounded_depth" + ], + "deps": { + "common": [ + { + "id": "itoa 1.0.1", + "target": "itoa" + }, + { + "id": "ryu 1.0.9", + "target": "ryu" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.79" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "sha-1 0.8.2": { + "name": "sha-1", + "version": "0.8.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sha-1/0.8.2/download", + "sha256": "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sha1", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "sha1", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "block-buffer 0.7.3", + "target": "block_buffer" + }, + { + "id": "digest 0.8.1", + "target": "digest" + }, + { + "id": "fake-simd 0.1.2", + "target": "fake_simd" + }, + { + "id": "opaque-debug 0.2.3", + "target": "opaque_debug" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.8.2" + }, + "license": "MIT OR Apache-2.0" + }, + "sha2 0.10.2": { + "name": "sha2", + "version": "0.10.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sha2/0.10.2/download", + "sha256": "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sha2", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "sha2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "digest 0.10.3", + "target": "digest" + } + ], + "selects": { + "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": [ + { + "id": "cpufeatures 0.2.1", + "target": "cpufeatures" + } + ] + } + }, + "edition": "2018", + "version": "0.10.2" + }, + "license": "MIT OR Apache-2.0" + }, + "siphasher 0.3.9": { + "name": "siphasher", + "version": "0.3.9", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/siphasher/0.3.9/download", + "sha256": "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "siphasher", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "siphasher", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2018", + "version": "0.3.9" + }, + "license": "MIT/Apache-2.0" + }, + "slug 0.1.4": { + "name": "slug", + "version": "0.1.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/slug/0.1.4/download", + "sha256": "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" + } + }, + "targets": [ + { + "Library": { + "crate_name": "slug", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "slug", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "deunicode 0.4.3", + "target": "deunicode" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.4" + }, + "license": "MIT/Apache-2.0" + }, + "smallvec 1.8.0": { + "name": "smallvec", + "version": "1.8.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/smallvec/1.8.0/download", + "sha256": "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" + } + }, + "targets": [ + { + "Library": { + "crate_name": "smallvec", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "smallvec", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.8.0" + }, + "license": "MIT/Apache-2.0" + }, + "smartstring 1.0.0": { + "name": "smartstring", + "version": "1.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/smartstring/1.0.0/download", + "sha256": "ea958ad90cacc8ece7f238fde3671e1b350ee1741964edf2a22fd16f60224163" + } + }, + "targets": [ + { + "Library": { + "crate_name": "smartstring", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "smartstring", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "serde", + "std" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "static_assertions 1.1.0", + "target": "static_assertions" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.0.0" + }, + "license": "MPL-2.0+" + }, + "smawk 0.3.1": { + "name": "smawk", + "version": "0.3.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/smawk/0.3.1/download", + "sha256": "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" + } + }, + "targets": [ + { + "Library": { + "crate_name": "smawk", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "smawk", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.3.1" + }, + "license": "MIT" + }, + "spectral 0.6.0": { + "name": "spectral", + "version": "0.6.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/spectral/0.6.0/download", + "sha256": "ae3c15181f4b14e52eeaac3efaeec4d2764716ce9c86da0c934c3e318649c5ba" + } + }, + "targets": [ + { + "Library": { + "crate_name": "spectral", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "spectral", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "num" + ], + "deps": { + "common": [ + { + "id": "num 0.1.42", + "target": "num" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.6.0" + }, + "license": "Apache-2.0" + }, + "static_assertions 1.1.0": { + "name": "static_assertions", + "version": "1.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/static_assertions/1.1.0/download", + "sha256": "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "static_assertions", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "static_assertions", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.1.0" + }, + "license": "MIT OR Apache-2.0" + }, + "strsim 0.10.0": { + "name": "strsim", + "version": "0.10.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/strsim/0.10.0/download", + "sha256": "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + } + }, + "targets": [ + { + "Library": { + "crate_name": "strsim", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "strsim", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.10.0" + }, + "license": "MIT" + }, + "syn 1.0.86": { + "name": "syn", + "version": "1.0.86", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/syn/1.0.86/download", + "sha256": "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "syn", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "syn", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "clone-impls", + "default", + "derive", + "full", + "parsing", + "printing", + "proc-macro", + "quote" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.36", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.15", + "target": "quote" + }, + { + "id": "syn 1.0.86", + "target": "build_script_build" + }, + { + "id": "unicode-xid 0.2.2", + "target": "unicode_xid" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.86" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "tempfile 3.3.0": { + "name": "tempfile", + "version": "3.3.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tempfile/3.3.0/download", + "sha256": "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tempfile", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "tempfile", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "fastrand 1.7.0", + "target": "fastrand" + }, + { + "id": "remove_dir_all 0.5.3", + "target": "remove_dir_all" + } + ], + "selects": { + "cfg(any(unix, target_os = \"wasi\"))": [ + { + "id": "libc 0.2.119", + "target": "libc" + } + ], + "cfg(target_os = \"redox\")": [ + { + "id": "redox_syscall 0.2.11", + "target": "syscall" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "3.3.0" + }, + "license": "MIT OR Apache-2.0" + }, + "tera 1.15.0": { + "name": "tera", + "version": "1.15.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tera/1.15.0/download", + "sha256": "d3cac831b615c25bcef632d1cabf864fa05813baad3d526829db18eb70e8b58d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tera", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "tera", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "builtins", + "chrono", + "chrono-tz", + "default", + "humansize", + "percent-encoding", + "rand", + "slug" + ], + "deps": { + "common": [ + { + "id": "chrono 0.4.19", + "target": "chrono" + }, + { + "id": "chrono-tz 0.6.1", + "target": "chrono_tz" + }, + { + "id": "globwalk 0.8.1", + "target": "globwalk" + }, + { + "id": "humansize 1.1.1", + "target": "humansize" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "percent-encoding 2.1.0", + "target": "percent_encoding" + }, + { + "id": "pest 2.1.3", + "target": "pest" + }, + { + "id": "rand 0.8.5", + "target": "rand" + }, + { + "id": "regex 1.5.4", + "target": "regex" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + }, + { + "id": "slug 0.1.4", + "target": "slug" + }, + { + "id": "unic-segment 0.9.0", + "target": "unic_segment" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "pest_derive 2.1.0", + "target": "pest_derive" + } + ], + "selects": {} + }, + "version": "1.15.0" + }, + "license": "MIT" + }, + "termcolor 1.1.3": { + "name": "termcolor", + "version": "1.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/termcolor/1.1.3/download", + "sha256": "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" + } + }, + "targets": [ + { + "Library": { + "crate_name": "termcolor", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "termcolor", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi-util 0.1.5", + "target": "winapi_util" + } + ] + } + }, + "edition": "2018", + "version": "1.1.3" + }, + "license": "Unlicense OR MIT" + }, + "textwrap 0.14.2": { + "name": "textwrap", + "version": "0.14.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/textwrap/0.14.2/download", + "sha256": "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" + } + }, + "targets": [ + { + "Library": { + "crate_name": "textwrap", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "textwrap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "smawk", + "unicode-linebreak", + "unicode-width" + ], + "deps": { + "common": [ + { + "id": "smawk 0.3.1", + "target": "smawk" + }, + { + "id": "unicode-linebreak 0.1.2", + "target": "unicode_linebreak" + }, + { + "id": "unicode-width 0.1.9", + "target": "unicode_width" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.14.2" + }, + "license": "MIT" + }, + "textwrap 0.15.0": { + "name": "textwrap", + "version": "0.15.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/textwrap/0.15.0/download", + "sha256": "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + } + }, + "targets": [ + { + "Library": { + "crate_name": "textwrap", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "textwrap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.15.0" + }, + "license": "MIT" + }, + "thread_local 1.1.4": { + "name": "thread_local", + "version": "1.1.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/thread_local/1.1.4/download", + "sha256": "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" + } + }, + "targets": [ + { + "Library": { + "crate_name": "thread_local", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "thread_local", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "once_cell 1.9.0", + "target": "once_cell" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.1.4" + }, + "license": "Apache-2.0/MIT" + }, + "tinyvec 1.5.1": { + "name": "tinyvec", + "version": "1.5.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tinyvec/1.5.1/download", + "sha256": "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tinyvec", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "tinyvec", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "alloc", + "default", + "tinyvec_macros" + ], + "deps": { + "common": [ + { + "id": "tinyvec_macros 0.1.0", + "target": "tinyvec_macros" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.5.1" + }, + "license": "Zlib OR Apache-2.0 OR MIT" + }, + "tinyvec_macros 0.1.0": { + "name": "tinyvec_macros", + "version": "0.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tinyvec_macros/0.1.0/download", + "sha256": "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tinyvec_macros", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "tinyvec_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.1.0" + }, + "license": "MIT OR Apache-2.0 OR Zlib" + }, + "toml 0.5.8": { + "name": "toml", + "version": "0.5.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/toml/0.5.8/download", + "sha256": "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "toml", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "toml", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.5.8" + }, + "license": "MIT/Apache-2.0" + }, + "typenum 1.15.0": { + "name": "typenum", + "version": "1.15.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/typenum/1.15.0/download", + "sha256": "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + } + }, + "targets": [ + { + "Library": { + "crate_name": "typenum", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_main", + "crate_root": "build/main.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "typenum", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "typenum 1.15.0", + "target": "build_script_main" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.15.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, + "ucd-trie 0.1.3": { + "name": "ucd-trie", + "version": "0.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ucd-trie/0.1.3/download", + "sha256": "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ucd_trie", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "ucd_trie", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2018", + "version": "0.1.3" + }, + "license": "MIT/Apache-2.0" + }, + "uncased 0.9.6": { + "name": "uncased", + "version": "0.9.6", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/uncased/0.9.6/download", + "sha256": "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "uncased", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "uncased", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "uncased 0.9.6", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.6" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "version_check 0.9.4", + "target": "version_check" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, + "unic-char-property 0.9.0": { + "name": "unic-char-property", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-char-property/0.9.0/download", + "sha256": "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_char_property", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_char_property", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unic-char-range 0.9.0", + "target": "unic_char_range" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unic-char-range 0.9.0": { + "name": "unic-char-range", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-char-range/0.9.0/download", + "sha256": "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_char_range", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_char_range", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unic-common 0.9.0": { + "name": "unic-common", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-common/0.9.0/download", + "sha256": "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_common", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_common", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unic-segment 0.9.0": { + "name": "unic-segment", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-segment/0.9.0/download", + "sha256": "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_segment", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_segment", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unic-ucd-segment 0.9.0", + "target": "unic_ucd_segment" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unic-ucd-segment 0.9.0": { + "name": "unic-ucd-segment", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-ucd-segment/0.9.0/download", + "sha256": "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_ucd_segment", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_ucd_segment", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unic-char-property 0.9.0", + "target": "unic_char_property" + }, + { + "id": "unic-char-range 0.9.0", + "target": "unic_char_range" + }, + { + "id": "unic-ucd-version 0.9.0", + "target": "unic_ucd_version" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unic-ucd-version 0.9.0": { + "name": "unic-ucd-version", + "version": "0.9.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unic-ucd-version/0.9.0/download", + "sha256": "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unic_ucd_version", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unic_ucd_version", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unic-common 0.9.0", + "target": "unic_common" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.0" + }, + "license": "MIT/Apache-2.0" + }, + "unicode-bidi 0.3.7": { + "name": "unicode-bidi", + "version": "0.3.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-bidi/0.3.7/download", + "sha256": "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_bidi", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unicode_bidi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2018", + "version": "0.3.7" + }, + "license": "MIT / Apache-2.0" + }, + "unicode-linebreak 0.1.2": { + "name": "unicode-linebreak", + "version": "0.1.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-linebreak/0.1.2/download", + "sha256": "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_linebreak", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unicode_linebreak", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unicode-linebreak 0.1.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "regex 1.5.4", + "target": "regex" + } + ], + "selects": {} + } + }, + "license": "Apache-2.0" + }, + "unicode-normalization 0.1.19": { + "name": "unicode-normalization", + "version": "0.1.19", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-normalization/0.1.19/download", + "sha256": "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_normalization", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unicode_normalization", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "deps": { + "common": [ + { + "id": "tinyvec 1.5.1", + "target": "tinyvec" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.19" + }, + "license": "MIT/Apache-2.0" + }, + "unicode-width 0.1.9": { + "name": "unicode-width", + "version": "0.1.9", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-width/0.1.9/download", + "sha256": "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_width", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unicode_width", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2015", + "version": "0.1.9" + }, + "license": "MIT/Apache-2.0" + }, + "unicode-xid 0.2.2": { + "name": "unicode-xid", + "version": "0.2.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-xid/0.2.2/download", + "sha256": "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_xid", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "unicode_xid", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default" + ], + "edition": "2015", + "version": "0.2.2" + }, + "license": "MIT OR Apache-2.0" + }, + "url 2.2.2": { + "name": "url", + "version": "2.2.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/url/2.2.2/download", + "sha256": "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "url", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "url", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "form_urlencoded 1.0.1", + "target": "form_urlencoded" + }, + { + "id": "idna 0.2.3", + "target": "idna" + }, + { + "id": "matches 0.1.9", + "target": "matches" + }, + { + "id": "percent-encoding 2.1.0", + "target": "percent_encoding" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "2.2.2" + }, + "license": "MIT/Apache-2.0" + }, + "urls_generator 0.1.0": { + "name": "urls_generator", + "version": "0.1.0", + "repository": null, + "targets": [ + { + "Binary": { + "crate_name": "urls_generator", + "crate_root": "src/main.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": null, + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "clap 3.1.5", + "target": "clap" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + }, + { + "id": "sha2 0.10.2", + "target": "sha2" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": null + }, + "vcpkg 0.2.15": { + "name": "vcpkg", + "version": "0.2.15", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/vcpkg/0.2.15/download", + "sha256": "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + } + }, + "targets": [ + { + "Library": { + "crate_name": "vcpkg", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "vcpkg", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.2.15" + }, + "license": "MIT/Apache-2.0" + }, + "version_check 0.9.4": { + "name": "version_check", + "version": "0.9.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/version_check/0.9.4/download", + "sha256": "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "version_check", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "version_check", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.9.4" + }, + "license": "MIT/Apache-2.0" + }, + "walkdir 2.3.2": { + "name": "walkdir", + "version": "2.3.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/walkdir/2.3.2/download", + "sha256": "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" + } + }, + "targets": [ + { + "Library": { + "crate_name": "walkdir", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "walkdir", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "same-file 1.0.6", + "target": "same_file" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + }, + { + "id": "winapi-util 0.1.5", + "target": "winapi_util" + } + ] + } + }, + "edition": "2018", + "version": "2.3.2" + }, + "license": "Unlicense/MIT" + }, + "wasi 0.10.2+wasi-snapshot-preview1": { + "name": "wasi", + "version": "0.10.2+wasi-snapshot-preview1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasi/0.10.2+wasi-snapshot-preview1/download", + "sha256": "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasi", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "wasi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "default", + "std" + ], + "edition": "2018", + "version": "0.10.2+wasi-snapshot-preview1" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" + }, + "winapi 0.3.9": { + "name": "winapi", + "version": "0.3.9", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi/0.3.9/download", + "sha256": "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "winapi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": [ + "consoleapi", + "errhandlingapi", + "fileapi", + "handleapi", + "minwinbase", + "minwindef", + "ntsecapi", + "processenv", + "profileapi", + "shlobj", + "std", + "timezoneapi", + "winbase", + "wincon", + "winerror", + "winnt" + ], + "deps": { + "common": [ + { + "id": "winapi 0.3.9", + "target": "build_script_build" + } + ], + "selects": { + "i686-pc-windows-gnu": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "winapi_i686_pc_windows_gnu" + } + ], + "x86_64-pc-windows-gnu": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "winapi_x86_64_pc_windows_gnu" + } + ] + } + }, + "edition": "2015", + "version": "0.3.9" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0" + }, + "winapi-i686-pc-windows-gnu 0.4.0": { + "name": "winapi-i686-pc-windows-gnu", + "version": "0.4.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download", + "sha256": "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_i686_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "winapi_i686_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0" + }, + "winapi-util 0.1.5": { + "name": "winapi-util", + "version": "0.1.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-util/0.1.5/download", + "sha256": "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_util", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "winapi_util", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.1.5" + }, + "license": "Unlicense/MIT" + }, + "winapi-x86_64-pc-windows-gnu 0.4.0": { + "name": "winapi-x86_64-pc-windows-gnu", + "version": "0.4.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download", + "sha256": "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_x86_64_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "include": [ + "**/*.rs" + ], + "exclude": [] + } + } + } + ], + "library_target_name": "winapi_x86_64_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0" + } + }, + "binary_crates": [ + "cargo-lock 7.0.1", + "cc 1.0.73", + "phf_generator 0.10.0" + ], + "workspace_members": { + "cargo-bazel 0.0.28": "crate_universe", + "cross_installer 0.1.0": "crate_universe/tools/cross_installer", + "urls_generator 0.1.0": "crate_universe/tools/urls_generator" + }, + "conditions": { + "aarch64-apple-darwin": [ + "aarch64-apple-darwin" + ], + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [], + "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))": [ + "aarch64-unknown-linux-gnu" + ], + "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "i686-apple-darwin", + "i686-linux-android", + "i686-pc-windows-msvc", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-linux-android", + "x86_64-pc-windows-msvc", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu" + ], + "cfg(any(unix, target_os = \"wasi\"))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "arm-unknown-linux-gnueabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu" + ], + "cfg(not(windows))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "arm-unknown-linux-gnueabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu" + ], + "cfg(target_arch = \"wasm32\")": [ + "wasm32-unknown-unknown", + "wasm32-wasi" + ], + "cfg(target_env = \"sgx\")": [], + "cfg(target_os = \"fuchsia\")": [], + "cfg(target_os = \"hermit\")": [], + "cfg(target_os = \"redox\")": [], + "cfg(target_os = \"wasi\")": [ + "wasm32-wasi" + ], + "cfg(unix)": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "arm-unknown-linux-gnueabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu" + ], + "cfg(windows)": [ + "i686-pc-windows-msvc", + "x86_64-pc-windows-msvc" + ], + "i686-pc-windows-gnu": [], + "x86_64-pc-windows-gnu": [] + } +} diff --git a/crate_universe/Cargo.lock b/crate_universe/Cargo.lock index 9efa40d75f..a8ec0863a6 100644 --- a/crate_universe/Cargo.lock +++ b/crate_universe/Cargo.lock @@ -2,49 +2,20 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" - -[[package]] -name = "assert_cmd" -version = "1.0.3" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2475b58cd94eb4f70159f4fd8844ba3b807532fe3131b3373fae060bbe30396" -dependencies = [ - "bstr", - "doc-comment", - "predicates", - "predicates-core", - "predicates-tree", - "wait-timeout", -] +checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" [[package]] name = "atty" @@ -59,21 +30,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "base64" -version = "0.13.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -89,11 +54,11 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -107,21 +72,13 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ - "lazy_static", "memchr", - "regex-automata", ] -[[package]] -name = "bumpalo" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" - [[package]] name = "byte-tools" version = "0.3.1" @@ -134,34 +91,39 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - [[package]] name = "camino" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4648c6d00a709aa069a236adcaae4f605a6241c72bf5bee79331a4b625921a9" +checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" dependencies = [ "serde", ] [[package]] -name = "cargo-clone-crate" -version = "0.1.6" -source = "git+https://github.com/ehuss/cargo-clone-crate.git?rev=36f5e72513a26ae539d0c3bfa7b3111b9aa11c6c#36f5e72513a26ae539d0c3bfa7b3111b9aa11c6c" +name = "cargo-bazel" +version = "0.0.28" dependencies = [ "anyhow", - "flate2", - "log", + "cargo-lock", + "cargo-platform", + "cargo_metadata", + "cargo_toml", + "cfg-expr", + "clap", + "crates-index", + "hex", + "pathdiff", "regex", - "reqwest", "semver", + "serde", "serde_json", - "tar", + "sha2", + "spectral", + "tempfile", + "tera", + "textwrap 0.14.2", + "toml", ] [[package]] @@ -178,50 +140,18 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0226944a63d1bf35a3b5f948dd7c59e263db83695c9e8bffc4037de02e30f1d7" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-raze" -version = "0.12.0" -source = "git+https://github.com/google/cargo-raze.git?rev=4cbe5272b0fbbb24577bc85b647b13cb9b99ce52#4cbe5272b0fbbb24577bc85b647b13cb9b99ce52" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" dependencies = [ - "anyhow", - "cargo-clone-crate", - "cargo-lock", - "cargo-platform", - "cargo_metadata", - "cargo_toml", - "cfg-expr 0.6.0", - "crates-index", - "docopt", - "glob", - "itertools", - "log", - "pathdiff", - "regex", - "rustc-serialize", - "semver", "serde", - "serde_derive", - "serde_json", - "slug", - "spdx", - "tempfile", - "tera", - "toml", - "url", ] [[package]] name = "cargo_metadata" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c297bd3135f558552f99a0daa180876984ea2c4ffa7470314540dff8c654109a" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", @@ -232,9 +162,9 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.8.1" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513d17226888c7b8283ac02a1c1b0d8a9d4cbf6db65dfadb79f598f5d7966fe9" +checksum = "4e270ef0cd868745878982f7ce470aa898d0d4bb248af67f0cf66f54617913ef" dependencies = [ "serde", "serde_derive", @@ -243,27 +173,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.70" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] [[package]] name = "cfg-expr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4f9cf6cb58661f5cdcda0240ab42788e009bd957ba56c1367aa01c7c6fbc05" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-expr" -version = "0.7.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30aa9e2ffbb838c6b451db14f3cd8e63ed622bf859f9956bc93845a10fafc26a" +checksum = "5e068cb2806bbc15b439846dc16c5f89f8599f2c3e4d73d4449d38f9b2f0b6c5" dependencies = [ "smallvec", ] @@ -283,98 +204,82 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time", "winapi", ] [[package]] name = "chrono-tz" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120" +checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552" dependencies = [ "chrono", + "chrono-tz-build", + "phf", +] + +[[package]] +name = "chrono-tz-build" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069" +dependencies = [ "parse-zoneinfo", + "phf", + "phf_codegen", ] [[package]] name = "clap" -version = "2.33.3" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312" dependencies = [ - "ansi_term", "atty", "bitflags", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim", + "termcolor", + "textwrap 0.15.0", ] [[package]] -name = "core-foundation" -version = "0.9.1" +name = "clap_derive" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" dependencies = [ - "core-foundation-sys", - "libc", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "core-foundation-sys" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" - -[[package]] -name = "cpuid-bool" -version = "0.1.2" +name = "cpufeatures" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" - -[[package]] -name = "crate_universe_resolver" -version = "0.1.0-experimental" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" dependencies = [ - "anyhow", - "assert_cmd", - "cargo-raze", - "cargo_metadata", - "cfg-expr 0.7.4", - "env_logger", - "hex", - "indoc", - "itertools", - "log", - "maplit", - "openssl", - "predicates", - "semver", - "serde", - "serde_json", - "sha2", - "spectral", - "structopt", - "tempfile", - "tera", - "toml", - "url", - "uuid", + "libc", ] [[package]] name = "crates-index" -version = "0.17.0" +version = "0.18.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad4af5c8dd9940a497ef4473e6e558b660a4a1b6e5ce2cb9d85454e2aaaf947" +checksum = "0044896374c388ccbf1497dad6384bf6111dbcad9d7069506df7450ce9b62ea3" dependencies = [ "git2", - "glob", "hex", "home", "memchr", + "num_cpus", + "rustc-hash", "semver", "serde", "serde_derive", @@ -383,36 +288,37 @@ dependencies = [ ] [[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +name = "cross_installer" +version = "0.1.0" dependencies = [ - "cfg-if", + "clap", ] [[package]] name = "crossbeam-utils" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" +checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ - "autocfg", "cfg-if", "lazy_static", ] [[package]] -name = "deunicode" -version = "0.4.3" +name = "crypto-common" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array 0.14.5", + "typenum", +] [[package]] -name = "difference" -version = "2.0.0" +name = "deunicode" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" [[package]] name = "digest" @@ -425,57 +331,12 @@ dependencies = [ [[package]] name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "docopt" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "lazy_static", - "regex", - "serde", - "strsim 0.10.0", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encoding_rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "block-buffer 0.10.2", + "crypto-common", ] [[package]] @@ -485,36 +346,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] -name = "filetime" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi", -] - -[[package]] -name = "flate2" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" -dependencies = [ - "cfg-if", - "crc32fast", - "libc", - "miniz_oxide", -] - -[[package]] -name = "float-cmp" -version = "0.8.0" +name = "fastrand" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" dependencies = [ - "num-traits", + "instant", ] [[package]] @@ -523,21 +360,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.0.1" @@ -554,55 +376,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -[[package]] -name = "futures-channel" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" - -[[package]] -name = "futures-io" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" - -[[package]] -name = "futures-sink" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" - -[[package]] -name = "futures-task" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" - -[[package]] -name = "futures-util" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" -dependencies = [ - "autocfg", - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "generic-array" version = "0.12.4" @@ -614,9 +387,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", "version_check", @@ -624,9 +397,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if", "libc", @@ -635,30 +408,22 @@ dependencies = [ [[package]] name = "git2" -version = "0.13.21" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659cd14835e75b64d9dba5b660463506763cf0aa6cb640aeeb0e98d841093490" +checksum = "6e7d3b96ec1fcaa8431cf04a4f1ef5caafe58d5cf7bcc31f09c1626adddb0ffe" dependencies = [ "bitflags", "libc", "libgit2-sys", "log", - "openssl-probe", - "openssl-sys", "url", ] -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - [[package]] name = "globset" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" +checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" dependencies = [ "aho-corasick", "bstr", @@ -678,25 +443,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "h2" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hashbrown" version = "0.11.2" @@ -705,18 +451,15 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "heck" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" -dependencies = [ - "unicode-segmentation", -] +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] @@ -739,88 +482,11 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" - -[[package]] -name = "httpdate" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" - [[package]] name = "humansize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] +checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" [[package]] name = "idna" @@ -835,9 +501,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b287fb45c60bb826a0dc68ff08742b9d88a2fea13d6e0c286b3172065aaf878c" +checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ "crossbeam-utils", "globset", @@ -853,43 +519,28 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" dependencies = [ "autocfg", "hashbrown", ] [[package]] -name = "indoc" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136" -dependencies = [ - "unindent", -] - -[[package]] -name = "ipnet" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" - -[[package]] -name = "itertools" -version = "0.10.0" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "either", + "cfg-if", ] [[package]] name = "itoa" -version = "0.4.7" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "jobserver" @@ -900,15 +551,6 @@ dependencies = [ "libc", ] -[[package]] -name = "js-sys" -version = "0.3.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -917,36 +559,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.101" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "libgit2-sys" -version = "0.12.22+1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c53ac117c44f7042ad8d8f5681378dfbc6010e49ec2c0d1f11dfedc7a4a1c3" -dependencies = [ - "cc", - "libc", - "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -] - -[[package]] -name = "libssh2-sys" -version = "0.2.21" +version = "0.13.1+1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0186af0d8f171ae6b9c4c90ec51898bad5d08a2d5e470903a50d9ad8959cbee" +checksum = "43e598aa7a4faedf1ea1b4608f582b06f0f40211eec551b7ef36019ae3f62def" dependencies = [ "cc", "libc", "libz-sys", - "openssl-sys", "pkg-config", - "vcpkg", ] [[package]] @@ -978,9 +604,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "matches" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "memchr" @@ -988,77 +614,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "mio" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "native-tls" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.1.42" @@ -1139,9 +694,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -1149,9 +704,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" +checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" [[package]] name = "opaque-debug" @@ -1160,52 +715,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.36" +name = "os_str_bytes" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" - -[[package]] -name = "openssl-src" -version = "111.16.0+1.1.1l" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab2173f69416cf3ec12debb5823d244127d23a9b127d5a5189aa97c5fa2859f" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" -dependencies = [ - "autocfg", - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", + "memchr", ] [[package]] @@ -1219,9 +734,9 @@ dependencies = [ [[package]] name = "pathdiff" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "percent-encoding" @@ -1273,57 +788,55 @@ dependencies = [ ] [[package]] -name = "pin-project-lite" -version = "0.2.7" +name = "phf" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_shared", +] [[package]] -name = "pkg-config" -version = "0.3.19" +name = "phf_codegen" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator", + "phf_shared", +] [[package]] -name = "ppv-lite86" -version = "0.2.10" +name = "phf_generator" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] [[package]] -name = "predicates" -version = "1.0.7" +name = "phf_shared" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb433456c1a57cc93554dea3ce40b4c19c4057e41c55d4a0f3d84ea71c325aa" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "difference", - "float-cmp", - "normalize-line-endings", - "predicates-core", - "regex", + "siphasher", + "uncased", ] [[package]] -name = "predicates-core" -version = "1.0.2" +name = "pkg-config" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" [[package]] -name = "predicates-tree" -version = "1.0.2" +name = "ppv-lite86" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f553275e5721409451eb85e15fd9a860a6e5ab4496eb215987502b5f5391f2" -dependencies = [ - "predicates-core", - "treeline", -] +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "proc-macro-error" @@ -1351,18 +864,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.26" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" +checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.9" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" dependencies = [ "proc-macro2", ] @@ -1382,24 +895,23 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.2", - "rand_hc", + "rand_core 0.6.3", ] [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core 0.6.3", ] [[package]] @@ -1414,25 +926,16 @@ dependencies = [ [[package]] name = "rand_core" version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] -name = "rand_hc" -version = "0.3.0" +name = "rand_core" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "rand_core 0.6.2", + "getrandom", ] [[package]] @@ -1446,38 +949,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.5" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", -] - [[package]] name = "regex-syntax" -version = "0.6.23" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "remove_dir_all" @@ -1489,39 +983,10 @@ dependencies = [ ] [[package]] -name = "reqwest" -version = "0.11.4" +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-serialize" @@ -1531,9 +996,9 @@ checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "same-file" @@ -1544,62 +1009,29 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi", -] - -[[package]] -name = "security-framework" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -1608,22 +1040,10 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "form_urlencoded", "itoa", "ryu", "serde", @@ -1638,27 +1058,25 @@ dependencies = [ "block-buffer 0.7.3", "digest 0.8.1", "fake-simd", - "opaque-debug 0.2.3", + "opaque-debug", ] [[package]] name = "sha2" -version = "0.9.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "block-buffer 0.9.0", "cfg-if", - "cpuid-bool", - "digest 0.9.0", - "opaque-debug 0.3.0", + "cpufeatures", + "digest 0.10.3", ] [[package]] -name = "slab" -version = "0.4.4" +name = "siphasher" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" +checksum = "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e" [[package]] name = "slug" @@ -1671,40 +1089,25 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "smartstring" -version = "0.2.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31aa6a31c0c2b21327ce875f7e8952322acfcfd0c27569a6e18a647281352c9b" +checksum = "ea958ad90cacc8ece7f238fde3671e1b350ee1741964edf2a22fd16f60224163" dependencies = [ "serde", "static_assertions", ] [[package]] -name = "socket2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spdx" -version = "0.3.6" +name = "smawk" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e6b6cc773b635ad64a05f00367c6f66d06a8708f7360f67c41d446dacdd0a0f" -dependencies = [ - "lazy_static", - "regex", - "smallvec", -] +checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "spectral" @@ -1721,72 +1124,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "structopt" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "syn" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb" +checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" dependencies = [ "proc-macro2", "quote", "unicode-xid", ] -[[package]] -name = "tar" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" -dependencies = [ - "filetime", - "libc", -] - [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand 0.8.3", "redox_syscall", "remove_dir_all", "winapi", @@ -1794,9 +1157,9 @@ dependencies = [ [[package]] name = "tera" -version = "1.7.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2617ab2fb1de8587a988a761692e59895438bebf404725d4f2123251f60bf23e" +checksum = "d3cac831b615c25bcef632d1cabf864fa05813baad3d526829db18eb70e8b58d" dependencies = [ "chrono", "chrono-tz", @@ -1806,7 +1169,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.3", + "rand 0.8.5", "regex", "serde", "serde_json", @@ -1816,46 +1179,44 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.11.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" dependencies = [ + "smawk", + "unicode-linebreak", "unicode-width", ] [[package]] -name = "thread_local" -version = "1.1.3" +name = "textwrap" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] -name = "time" -version = "0.1.43" +name = "thread_local" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ - "libc", - "winapi", + "once_cell", ] [[package]] name = "tinyvec" -version = "1.2.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -1866,46 +1227,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -[[package]] -name = "tokio" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" -dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "pin-project-lite", - "winapi", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "toml" version = "0.5.8" @@ -1916,55 +1237,26 @@ dependencies = [ ] [[package]] -name = "tower-service" -version = "0.3.1" +name = "typenum" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "tracing" -version = "0.1.26" +name = "ucd-trie" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] -name = "tracing-core" -version = "0.1.19" +name = "uncased" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0" dependencies = [ - "lazy_static", + "version_check", ] -[[package]] -name = "treeline" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "typenum" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" - -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - [[package]] name = "unic-char-property" version = "0.9.0" @@ -2017,66 +1309,60 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.5" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" + +[[package]] +name = "unicode-linebreak" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" +checksum = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f" dependencies = [ - "matches", + "regex", ] [[package]] name = "unicode-normalization" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "unindent" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "url" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", "idna", "matches", "percent-encoding", - "serde", ] [[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +name = "urls_generator" +version = "0.1.0" dependencies = [ - "getrandom", + "clap", + "hex", + "serde_json", + "sha2", ] [[package]] @@ -2085,26 +1371,11 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - -[[package]] -name = "wait-timeout" -version = "0.2.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -2117,100 +1388,12 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - [[package]] name = "wasi" version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" -[[package]] -name = "wasm-bindgen" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" -dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fded345a6559c2cfee778d562300c581f7d4ff3edb9b0d230d69800d213972" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" - -[[package]] -name = "web-sys" -version = "0.3.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2241,12 +1424,3 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi", -] diff --git a/crate_universe/Cargo.toml b/crate_universe/Cargo.toml index 1cf09ab6a1..1fe8d838d5 100644 --- a/crate_universe/Cargo.toml +++ b/crate_universe/Cargo.toml @@ -1,50 +1,43 @@ +[workspace] +members = [ + "tools/cross_installer", + "tools/urls_generator", +] + [package] -name = "crate_universe_resolver" -version = "0.1.0-experimental" +name = "cargo-bazel" +version = "0.0.28" authors = [ - "Daniel Wagner-Hall ", - "Romain Chossart ", - "Gibson Fahnestock ", + "Andre Brisco - andre.brisco@protonmail.com", ] edition = "2018" +[features] +cargo = [] +default = ["cargo"] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# Several of these dependencies need to be compatible with the version cargo-raze is using. - -anyhow = "1" -cargo_metadata = "0.14" -# TODO: Use upstream once following changes are merged: -# https://github.com/google/cargo-raze/pull/407 -# https://github.com/google/cargo-raze/pull/415 -cargo-raze = { git = "https://github.com/google/cargo-raze.git", rev = "4cbe5272b0fbbb24577bc85b647b13cb9b99ce52" } -cfg-expr = "0.7.4" -env_logger = "0.8" -hex = "0.4" -indoc = "1.0.2" -itertools = "0.10" -log = "0.4" -# openssl is a transitive dep - this enables the feature to allow it to build on buildkite. -openssl = { version = "0.10", features = ["vendored"] } -semver = "1" -serde = { version = "1", features = ["derive"] } -serde_json = "1" -sha2 = "0.9" -structopt = "0.3" -tempfile = "3" -tera = "1.6" -toml = "0.5.6" -url = { version = "2.2", features = ["serde"] } -uuid = { version = "0.8", features = ["v4"] } - -[dev-dependencies] -assert_cmd = "1" -maplit = "1" -predicates = "1" -spectral = "0.6" +anyhow = "1.0.51" +cargo_metadata = "0.14.1" +cargo_toml = "0.11.4" +cargo-lock = "7.0.1" +cargo-platform = "0.1.2" +cfg-expr = "0.10.1" +clap = { version = "3.0.14", features = ["derive", "env"] } +crates-index = { version = "0.18.5", default-features = false } +hex = "0.4.3" +pathdiff = "0.2.1" +regex = "1.5.4" +semver = "1.0.5" +serde = "1.0.136" +serde_json = "1.0.79" +sha2 = "0.10.1" tempfile = "3.2.0" +tera = "1.15.0" +textwrap = "0.14.2" +toml = "0.5.8" -[patch.crates-io] -# Until https://github.com/ehuss/cargo-clone-crate/pull/6 is released -cargo-clone-crate = { git = "https://github.com/ehuss/cargo-clone-crate.git", rev = "36f5e72513a26ae539d0c3bfa7b3111b9aa11c6c" } +[dev-dependencies] +spectral = "0.6.0" diff --git a/crate_universe/Cross.toml b/crate_universe/Cross.toml deleted file mode 100644 index 0a73031bda..0000000000 --- a/crate_universe/Cross.toml +++ /dev/null @@ -1,18 +0,0 @@ -# Darwin targets build on the host -# https://github.com/rust-embedded/cross/issues/223 -# [target.aarch64-apple-darwin] -# image = "rustembedded/cross:aarch64-apple-darwin" - -[target.aarch64-unknown-linux-gnu] -image = "rustembedded/cross:aarch64-unknown-linux-gnu@sha256:c970d529baa1bab953f9a0f2c2294e51a12a2e710599ab91de69c45a1785ba46" - -# Darwin targets build on the host -# https://github.com/rust-embedded/cross/issues/223 -# [target.x86_64-apple-darwin] -# image = "rustembedded/cross:x86_64-apple-darwin" - -[target.x86_64-pc-windows-gnu] -image = "rustembedded/cross:x86_64-pc-windows-gnu@sha256:5005553ddf4e82d4703ee7f458a24802a014f03884f87c6277e9c718765d3517" - -[target.x86_64-unknown-linux-gnu] -image = "rustembedded/cross:x86_64-unknown-linux-gnu@sha256:a7f681882d23eae287cff48a93aff93f71a84859a6670c2a4fe2b82949ebb91c" diff --git a/crate_universe/README.md b/crate_universe/README.md index f3bc54caa2..2654173104 100644 --- a/crate_universe/README.md +++ b/crate_universe/README.md @@ -1,12 +1,11 @@ -# Crate Universe +# Cargo->Bazel -Crate Universe is akin to a modified version of cargo-raze that can be run as -part of a Bazel build. Instead of generating BUILD files in advance with -cargo-raze, the BUILD files can be created automatically at build time. It can -expose crates gathered from Cargo.toml files like cargo-raze does, and also -supports declaring crates directly in BUILD files, for cases where compatibility -with Cargo is not required. +`cargo->bazel` is a tool used which uses [Cargo][cargo] to generate build targets for [Bazel][bazel]. -**Note**: `crate_universe` is experimental, and may have breaking API changes at any time. These instructions may also change without notice. +## [Documentation][docs] -More information can be found in the [rules_rust documentation](https://bazelbuild.github.io/rules_rust/crate_universe.html). +For detailed documentation. See https://bazelbuild.github.io/rules_rust/crate_universe.html + +[cargo]: https://doc.rust-lang.org/cargo/ +[bazel]: https://bazel.build/ +[docs]: https://bazelbuild.github.io/rules_rust/crate_universe.html diff --git a/crate_universe/bootstrap.bzl b/crate_universe/bootstrap.bzl deleted file mode 100644 index 6dc3efedad..0000000000 --- a/crate_universe/bootstrap.bzl +++ /dev/null @@ -1,29 +0,0 @@ -"""A module for declaraing a repository for bootstrapping crate_universe""" - -load("//cargo:defs.bzl", "cargo_bootstrap_repository", "cargo_env") -load("//crate_universe/third_party/openssl:openssl_repositories.bzl", "openssl_repositories") -load("//rust:defs.bzl", "rust_common") - -def crate_universe_bootstrap(): - openssl_repositories() - - cargo_bootstrap_repository( - name = "rules_rust_crate_universe_bootstrap", - cargo_lockfile = Label("//crate_universe:Cargo.lock"), - cargo_toml = Label("//crate_universe:Cargo.toml"), - version = rust_common.default_version, - binary = "crate_universe_resolver", - env = { - "*": cargo_env({ - "OPENSSL_STATIC": "1", - }), - }, - env_label = { - "x86_64-pc-windows-gnu": cargo_env({ - "PERL": "@perl_windows//:perl/bin/perl.exe", - }), - "x86_64-pc-windows-msvc": cargo_env({ - "PERL": "@perl_windows//:perl/bin/perl.exe", - }), - }, - ) diff --git a/crate_universe/crates.bzl b/crate_universe/crates.bzl new file mode 100644 index 0000000000..40dc41334d --- /dev/null +++ b/crate_universe/crates.bzl @@ -0,0 +1,68 @@ +"""A module defining dependencies of the `cargo-bazel` Rust target""" + +load("@rules_rust//rust:defs.bzl", "rust_common") +load("//crate_universe:defs.bzl", "crate", "crates_repository", "crates_vendor") +load("//crate_universe:deps_bootstrap.bzl", "cargo_bazel_bootstrap") +load("//crate_universe/3rdparty:third_party_deps.bzl", "third_party_deps") +load("//crate_universe/3rdparty/crates:crates.bzl", _vendor_crate_repositories = "crate_repositories") +load("//crate_universe/private:vendor_utils.bzl", "crates_vendor_deps") +load("//crate_universe/tools/cross_installer:cross_installer_deps.bzl", "cross_installer_deps") + +USE_CRATES_REPOSITORY = False + +_REPOSITORY_NAME = "crate_index" + +_ANNOTATIONS = { + "libgit2-sys": [crate.annotation( + gen_build_script = False, + deps = ["@libgit2"], + )], + "libz-sys": [crate.annotation( + gen_build_script = False, + deps = ["@zlib"], + )], +} + +_MANIFESTS = [ + "@rules_rust//crate_universe:Cargo.toml", + "@rules_rust//crate_universe/tools/cross_installer:Cargo.toml", + "@rules_rust//crate_universe/tools/urls_generator:Cargo.toml", +] + +def crate_deps_repository(rust_version = rust_common.default_version, bootstrap = False): + """Define dependencies of the `cargo-bazel` Rust target + + Args: + rust_version (str, optional): The version of rust to use when generating dependencies. + bootstrap (bool, optional): If true, a `cargo_bootstrap_repository` target will be generated. + """ + third_party_deps() + + cargo_bazel_bootstrap(rust_version = rust_version) + + if USE_CRATES_REPOSITORY: + crates_repository( + name = _REPOSITORY_NAME, + annotations = _ANNOTATIONS, + generator = "@cargo_bazel_bootstrap//:cargo-bazel" if bootstrap else None, + lockfile = "@rules_rust//crate_universe:Cargo.Bazel.lock", + manifests = _MANIFESTS, + rust_version = rust_version, + ) + + else: + _vendor_crate_repositories() + + crates_vendor_deps() + cross_installer_deps() + +def crate_deps_target(name = "crates_vendor", vendor_path = "crates"): + crates_vendor( + name = name, + repository_name = _REPOSITORY_NAME, + annotations = _ANNOTATIONS, + manifests = _MANIFESTS, + vendor_path = vendor_path, + mode = "remote", + tags = ["manual"], + ) diff --git a/crate_universe/crates_deps.bzl b/crate_universe/crates_deps.bzl new file mode 100644 index 0000000000..5883d5066a --- /dev/null +++ b/crate_universe/crates_deps.bzl @@ -0,0 +1,8 @@ +"""Transitive dependencies of the `cargo-bazel` Rust target""" + +load("@crate_index//:defs.bzl", _repository_crate_repositories = "crate_repositories") +load("//crate_universe:crates.bzl", "USE_CRATES_REPOSITORY") + +def crate_repositories(): + if USE_CRATES_REPOSITORY: + _repository_crate_repositories() diff --git a/crate_universe/defs.bzl b/crate_universe/defs.bzl index 32deef15b5..13060e8c77 100644 --- a/crate_universe/defs.bzl +++ b/crate_universe/defs.bzl @@ -1,397 +1,172 @@ -"""A module defining the `crate_universe` rule""" +"""# Crate Universe -load("//crate_universe/private:defaults.bzl", "DEFAULT_SHA256_CHECKSUMS", "DEFAULT_URL_TEMPLATE") -load("//crate_universe/private:util.bzl", "get_cargo_and_rustc", "get_host_triple") -load("//rust:defs.bzl", "rust_common") -load("//rust:repositories.bzl", "DEFAULT_TOOLCHAIN_TRIPLES") -load("//rust/platform:triple_mappings.bzl", "system_to_binary_ext", "triple_to_system") +Crate Universe is a set of Bazel rule for generating Rust targets using Cargo. -# The default template for download URLs from the default registry (i.e. crates.io). -DEFAULT_DEFAULT_CRATE_DOWNLOAD_URL_TEMPLATE = "https://crates.io/api/v1/crates/{crate}/{version}/download" +## Experimental -def _input_content_template(ctx, name, packages, cargo_toml_files, overrides, default_registry_download_url_template, additional_registries, targets, cargo_bin_path): - """Generate json encoded dependency info for the crate resolver. +`crate_universe` is experimental, and may have breaking API changes at any time. These instructions may also change without notice. - Args: - ctx (repository_ctx): The repository rule's context object. - name (str): The name of the repository. - packages (list): A list of json encoded `crate.spec` entries. - cargo_toml_files (list): A list of `Label`s to Cargo manifests. - overrides (dict): A dict of crate name (`str`) to json encoded `crate.override` data. - default_registry_download_url_template (str): The URL template for downloading crates from the default registry. - additional_registries (dict): Dict of registry name (`str`) to the URL of the index (`str`). - targets (list): A list of target platform triples - cargo_bin_path (path): The label of a Cargo binary. +## Rules - Returns: - str: Json encoded config data for the resolver - """ +- [crates_repository](#crates_repository) +- [crates_vendor](#crates_vendor) +- [crate.spec](#cratespec) +- [crate.workspace_member](#crateworkspace_member) +- [crate.annotation](#crateannotation) +- [render_config](#render_config) +- [splicing_config](#splicing_config) - # packages are expected to be json encoded, so we decode them - # to ensure they are correctly re-encoded - dcoded_pkgs = [json.decode(artifact) for artifact in packages] +## `crates_repository` Workflows - # Generate an easy to use map of `Cargo.toml` files - encodable_cargo_toml_files = dict() - for label in cargo_toml_files: - encodable_cargo_toml_files.update({str(label): str(ctx.path(label))}) +The [`crates_repository`](#crates_repository) rule (the primary repository rule of `cargo-bazel`) supports a number of different ways users +can express and organize their dependencies. The most common are listed below though there are more to be found in +the [./examples/crate_universe](https://github.com/bazelbuild/rules_rust/tree/main/examples/crate_universe) directory. - # Overrides are passed as encoded json strings, so we decode - # them to ensure they are correctly re-encoded - encodable_overrides = dict() - for key, value in overrides.items(): - encodable_overrides.update({key: json.decode(value)}) +### Cargo Workspaces - return "{}\n".format( - json.encode_indent( - struct( - additional_registries = additional_registries, - cargo = str(cargo_bin_path), - cargo_toml_files = encodable_cargo_toml_files, - default_registry_download_url_template = default_registry_download_url_template, - overrides = encodable_overrides, - packages = dcoded_pkgs, - repository_name = name, - target_triples = targets, - ), - indent = " " * 4, - ), - ) - -def _crate_universe_resolve_impl(repository_ctx): - """Entry-point repository to manage rust dependencies. - - General flow is: - - Serialize user-provided rule attributes into JSON - - Call the Rust resolver script. It writes a `defs.bzl` file in this repo containing the - transitive dependencies as repo rules in a `pinned_rust_install()` macro. - - The user then calls defs.bzl%pinned_rust_install(). - """ - - host_triple, resolver_triple = get_host_triple(repository_ctx) - tools = get_cargo_and_rustc(repository_ctx, host_triple) - extension = system_to_binary_ext(triple_to_system(host_triple)) - - if repository_ctx.attr.resolver: - resolver_path = repository_ctx.path(repository_ctx.attr.resolver) - else: - # Allow for an an override environment variable to define a url to a binary - resolver_url = repository_ctx.os.environ.get("RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE", None) - resolver_sha = repository_ctx.os.environ.get("RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE_SHA256", None) - if resolver_url: - if resolver_url.startswith("file://"): - sha256_result = repository_ctx.execute(["sha256sum", resolver_url[7:]]) - resolver_sha = sha256_result.stdout[:64] - else: - resolver_url = repository_ctx.attr.resolver_download_url_template.format( - host_triple = resolver_triple, - extension = extension, - ) - resolver_sha = repository_ctx.attr.resolver_sha256s.get(resolver_triple, None) - - resolver_path = repository_ctx.path("resolver") - repository_ctx.download( - url = resolver_url, - sha256 = resolver_sha, - output = resolver_path, - executable = True, - ) +One of the simpler ways to wire up dependencies would be to first structure your project into a [Cargo workspace][cw]. +The `crates_repository` rule can ingest a the root `Cargo.toml` file and generate dependencies from there. - lockfile_path = None - if repository_ctx.attr.lockfile: - lockfile_path = repository_ctx.path(repository_ctx.attr.lockfile) +```python +load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository") - input_content = _input_content_template( - ctx = repository_ctx, - name = repository_ctx.attr.name, - packages = repository_ctx.attr.packages, - cargo_toml_files = repository_ctx.attr.cargo_toml_files, - overrides = repository_ctx.attr.overrides, - default_registry_download_url_template = repository_ctx.attr.default_registry_download_url_template, - additional_registries = repository_ctx.attr.additional_registries, - targets = repository_ctx.attr.supported_targets, - cargo_bin_path = tools.cargo, - ) - - input_path = "{name}.resolver_config.json".format(name = repository_ctx.attr.name) - repository_ctx.file(input_path, content = input_content) - - args = [ - resolver_path, - "--input_path", - input_path, - "--repository_dir", - repository_ctx.path("."), - "--repo-name", - repository_ctx.attr.name, - ] - if lockfile_path != None: - args.append("--lockfile") - str(args.append(lockfile_path)) - env_var_names = repository_ctx.os.environ.keys() - if "RULES_RUST_REPIN" in env_var_names or "REPIN" in env_var_names: - args.append("--update-lockfile") +crates_repository( + name = "crate_index", + lockfile = "//:Cargo.Bazel.lock", + manifests = ["//:Cargo.toml"], +) - result = repository_ctx.execute( - args, - environment = { - # The resolver invokes `cargo metadata` which relies on `rustc` being on the $PATH - # See https://github.com/rust-lang/cargo/issues/8219 - "CARGO": str(tools.cargo), - "RUSTC": str(tools.rustc), - "RUST_LOG": "info", - }, - quiet = False, - ) - if result.return_code != 0: - fail("Error resolving crate_universe deps - see above output for more information") +load("@crate_index//:defs.bzl", "crate_repositories") + +crate_repositories() +``` + +The generated `crates_repository` contains helper macros which make collecting dependencies for Bazel targets simpler. +Notably, the `all_crate_deps` and `aliases` macros commonly allow the `Cargo.toml` files to be the single source of +truth for dependencies. Since these macros come from the generated repository, the dependencies and alias definitions +they return will automatically update BUILD targets. + +```python +load("@crate_index//:defs.bzl", "aliases", "all_crate_deps") +load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") + +rust_library( + name = "lib", + aliases = aliases(), + deps = all_crate_deps( + normal = True, + ), + proc_macro_deps = all_crate_deps( + proc_macro = True, + ), +) - repository_ctx.file("BUILD.bazel") +rust_test( + name = "unit_test", + crate = ":lib", + aliases = aliases( + normal_dev = True, + proc_macro_dev = True, + ), + deps = all_crate_deps( + normal_dev = True, + ), + proc_macro_deps = all_crate_deps( + proc_macro_dev = True, + ), +) +``` -crate_universe = repository_rule( - doc = """\ -A rule for downloading Rust dependencies (crates). +### Direct Packages -__WARNING__: This rule experimental and subject to change without warning. +In cases where Rust targets have heavy interractions with other Bazel targests ([Cc][cc], [Proto][proto], etc.), +maintaining `Cargo.toml` files may have deminishing returns as things like [rust-analyzer][ra] begin to be confused +about missing targets or environment variables defined only in Bazel. In workspaces like this, it may be desirable +to have a "Cargo free" setup. `crates_repository` supports this through the `packages` attribute. -Environment Variables: -- `REPIN`: Re-pin the lockfile if set (useful for repinning deps from multiple rulesets). -- `RULES_RUST_REPIN`: Re-pin the lockfile if set (useful for only repinning Rust deps). -- `RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE`: Override URL to use to download resolver binary - - for local paths use a `file://` URL. -- `RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE_SHA256`: An optional sha256 value for the binary at the override url location. -""", - implementation = _crate_universe_resolve_impl, - attrs = { - "additional_registries": attr.string_dict( - doc = """\ -Additional registries used by Cargo (see https://doc.rust-lang.org/cargo/reference/registries.html). +```python +load("@cargo_bazel//:defs.bzl", "crate", "crates_repository", "render_config") -Dict of registry_name: index_url. -""", - ), - "cargo_toml_files": attr.label_list( - doc = "A list of Cargo manifests (`Cargo.toml` files).", - allow_files = True, - ), - "default_registry_download_url_template": attr.string( - doc = "A template for where to download crates from for the default crate registry. This must contain `{version}` and `{crate}` templates.", - default = DEFAULT_DEFAULT_CRATE_DOWNLOAD_URL_TEMPLATE, - ), - "iso_date": attr.string( - doc = "The iso_date of cargo binary the resolver should use. Note: This can only be set if `version` is `beta` or `nightly`", - ), - "lockfile": attr.label( - doc = ( - "The path to a file which stores pinned information about the generated dependency graph. " + - "this target must be a file and will be updated by the repository rule when the `REPIN` " + - "environment variable is set. If this is not set, dependencies will be re-resolved more " + - "often, setting this allows caching resolves, but will error if the cache is stale." - ), - allow_single_file = True, - mandatory = False, - ), - "overrides": attr.string_dict( - doc = ( - "Mapping of crate name to specification overrides. See [crate.override](#crateoverride) " + - " for more details." - ), - ), - "packages": attr.string_list( - doc = "A list of crate specifications. See [crate.spec](#cratespec) for more details.", - allow_empty = True, - ), - "resolver": attr.label( - doc = ( - "The label of a `crate_universe` resolver. Resolvers can be built using `cargo_bootstrap_repository` " + - "but if possible, it's recommended to stick with downloading a resoler via `resolver_download_url_template`." - ), - ), - "resolver_download_url_template": attr.string( - doc = ( - "URL template from which to download the resolver binary. {host_triple} and {extension} will be " + - "filled in according to the host platform." - ), - default = DEFAULT_URL_TEMPLATE, - ), - "resolver_sha256s": attr.string_dict( - doc = "Dictionary of host_triple -> sha256 for resolver binary.", - default = DEFAULT_SHA256_CHECKSUMS, - ), - "rust_toolchain_repository_template": attr.string( - doc = ( - "The template to use for finding the host `rust_toolchain` repository. `{version}` (eg. '1.53.0'), " + - "`{triple}` (eg. 'x86_64-unknown-linux-gnu'), `{system}` (eg. 'darwin'), and `{arch}` (eg. 'aarch64') " + - "will be replaced in the string if present." - ), - default = "rust_{system}_{arch}", - ), - "rust_toolchain_repository_tool_path": attr.string_dict( - doc = "The relative path of the tools in the repository", - default = { - "cargo": ":bin/cargo", - "rustc": ":bin/rustc", - }, +crates_repository( + name = "crate_index", + lockfile = "//:Cargo.Bazel.lock", + packages = { + "async-trait": crate.spec( + version = "0.1.51", ), - "sha256s": attr.string_dict( - doc = "The sha256 checksum of the desired rust artifacts", + "mockall": crate.spec( + version = "0.10.2", ), - "supported_targets": attr.string_list( - doc = ( - "A list of supported [platform triples](https://doc.rust-lang.org/nightly/rustc/platform-support.html) " + - "to consider when resoliving dependencies." - ), - allow_empty = False, - default = DEFAULT_TOOLCHAIN_TRIPLES.keys(), - ), - "version": attr.string( - doc = "The version of cargo the resolver should use", - default = rust_common.default_version, + "tokio": crate.spec( + version = "1.12.0", ), }, - environ = [ - "REPIN", - "RULES_RUST_REPIN", - "RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE", - "RULES_RUST_CRATE_UNIVERSE_RESOLVER_URL_OVERRIDE_SHA256", - ], + # Setting the default package name to `""` forces the use of the macros defined in this repository + # to always use the root package when looking for dependencies or aliases. This should be considered + # optional as the repository also exposes alises for easy access to all dependencies. + render_config = render_config( + default_package_name = "" + ), ) -def _spec( - name, - semver, - features = None): - """A simple crate definition for use in the `crate_universe` rule. - - __WARNING__: This rule experimental and subject to change without warning. - - Example: - - ```python - load("@rules_rust//crate_universe:defs.bzl", "crate_universe", "crate") - - crate_universe( - name = "spec_example", - packages = [ - crate.spec( - name = "lazy_static", - semver = "=1.4", - ), - ], - ) - ``` - - Args: - name (str): The name of the crate as it would appear in a crate registry. - semver (str): The desired version ([semver](https://semver.org/)) of the crate - features (list, optional): A list of desired [features](https://doc.rust-lang.org/cargo/reference/features.html). - - Returns: - str: A json encoded struct of crate info - """ - return json.encode(struct( - name = name, - semver = semver, - features = features or [], - )) - -def _override( - extra_bazel_data_deps = None, - extra_bazel_deps = None, - extra_build_script_bazel_data_deps = None, - extra_build_script_bazel_deps = None, - extra_build_script_env_vars = None, - extra_rustc_env_vars = None, - features_to_remove = []): - """A map of overrides for a particular crate - - __WARNING__: This rule experimental and subject to change without warning. - - Example: +load("@crate_index//:defs.bzl", "crate_repositories") - ```python - load("@rules_rust//crate_universe:defs.bzl", "crate_universe", "crate") +crate_repositories() +``` - crate_universe( - name = "override_example", - # [...] - overrides = { - "tokio": crate.override( - extra_rustc_env_vars = { - "MY_ENV_VAR": "MY_ENV_VALUE", - }, - extra_build_script_env_vars = { - "MY_BUILD_SCRIPT_ENV_VAR": "MY_ENV_VALUE", - }, - extra_bazel_deps = { - # Extra dependencies are per target. They are additive. - "cfg(unix)": ["@somerepo//:foo"], # cfg() predicate. - "x86_64-apple-darwin": ["@somerepo//:bar"], # Specific triple. - "cfg(all())": ["@somerepo//:baz"], # Applies to all targets ("regular dependency"). - }, - extra_build_script_bazel_deps = { - # Extra dependencies are per target. They are additive. - "cfg(unix)": ["@buildscriptdep//:foo"], - "x86_64-apple-darwin": ["@buildscriptdep//:bar"], - "cfg(all())": ["@buildscriptdep//:baz"], - }, - extra_bazel_data_deps = { - # ... - }, - extra_build_script_bazel_data_deps = { - # ... - }, - ), - }, - ) - ``` +Consuming dependencies may be more ergonomic in this case through the aliases defined in the new repository. - Args: - extra_bazel_data_deps (dict, optional): Targets to add to the `data` attribute - of the generated target (eg: [rust_library.data](./defs.md#rust_library-data)). - extra_bazel_deps (dict, optional): Targets to add to the `deps` attribute - of the generated target (eg: [rust_library.deps](./defs.md#rust_library-data)). - extra_rustc_env_vars (dict, optional): Environment variables to add to the `rustc_env` - attribute for the generated target (eg: [rust_library.rustc_env](./defs.md#rust_library-rustc_env)). - extra_build_script_bazel_data_deps (dict, optional): Targets to add to the - [data](./cargo_build_script.md#cargo_build_script-data) attribute of the generated - `cargo_build_script` target. - extra_build_script_bazel_deps (dict, optional): Targets to add to the - [deps](./cargo_build_script.md#cargo_build_script-deps) attribute of the generated - `cargo_build_script` target. - extra_build_script_env_vars (dict, optional): Environment variables to add to the - [build_script_env](./cargo_build_script.md#cargo_build_script-build_script_env) - attribute of the generated `cargo_build_script` target. - features_to_remove (list, optional): A list of features to remove from a generated target. +```python +load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") - Returns: - str: A json encoded struct of crate overrides - """ - for (dep_key, dep_val) in [ - (extra_bazel_deps, extra_bazel_deps), - (extra_build_script_bazel_deps, extra_build_script_bazel_deps), - (extra_bazel_data_deps, extra_bazel_data_deps), - (extra_build_script_bazel_data_deps, extra_build_script_bazel_data_deps), - ]: - if dep_val != None: - if not type(dep_val) == "dict": - fail("The {} attribute should be a dictionary".format(dep_key)) +rust_library( + name = "lib", + deps = [ + "@crate_index//:tokio", + ], + proc_macro_deps = [ + "@crate_index//:async-trait", + ], +) - for deps in dep_val.values(): - if not type(deps) == "list" or any([type(x) != "string" for x in deps]): - fail("The {} values should be lists of strings".format(dep_key)) +rust_test( + name = "unit_test", + crate = ":lib", + deps = [ + "@crate_index//:mockall", + ], +) +``` - return json.encode(struct( - extra_rustc_env_vars = extra_rustc_env_vars or {}, - extra_build_script_env_vars = extra_build_script_env_vars or {}, - extra_bazel_deps = extra_bazel_deps or {}, - extra_build_script_bazel_deps = extra_build_script_bazel_deps or {}, - extra_bazel_data_deps = extra_bazel_data_deps or {}, - extra_build_script_bazel_data_deps = extra_build_script_bazel_data_deps or {}, - features_to_remove = features_to_remove, - )) +[cw]: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html +[cc]: https://docs.bazel.build/versions/main/be/c-cpp.html +[proto]: https://rules-proto-grpc.com/en/latest/lang/rust.html +[ra]: https://rust-analyzer.github.io/ +""" -crate = struct( - spec = _spec, - override = _override, +load( + "//crate_universe/private:crate.bzl", + _crate = "crate", ) +load( + "//crate_universe/private:crates_repository.bzl", + _crates_repository = "crates_repository", +) +load( + "//crate_universe/private:crates_vendor.bzl", + _crates_vendor = "crates_vendor", +) +load( + "//crate_universe/private:generate_utils.bzl", + _render_config = "render_config", +) +load( + "//crate_universe/private:splicing_utils.bzl", + _splicing_config = "splicing_config", +) + +crate = _crate +crates_repository = _crates_repository +crates_vendor = _crates_vendor +render_config = _render_config +splicing_config = _splicing_config diff --git a/crate_universe/deps_bootstrap.bzl b/crate_universe/deps_bootstrap.bzl new file mode 100644 index 0000000000..28f6d14b0d --- /dev/null +++ b/crate_universe/deps_bootstrap.bzl @@ -0,0 +1,25 @@ +"""A module is used to assist in bootstrapping cargo-bazel""" + +load("//cargo:defs.bzl", "cargo_bootstrap_repository") +load("//crate_universe/private:srcs.bzl", "CARGO_BAZEL_SRCS") + +# buildifier: disable=bzl-visibility +load("//rust/private:common.bzl", "rust_common") + +def cargo_bazel_bootstrap(name = "cargo_bazel_bootstrap", rust_version = rust_common.default_version): + """An optional repository which bootstraps `cargo-bazel` for use with `crates_repository` + + Args: + name (str, optional): The name of the `cargo_bootstrap_repository`. + rust_version (str, optional): The rust version to use. Defaults to the default of `cargo_bootstrap_repository`. + """ + cargo_bootstrap_repository( + name = name, + srcs = CARGO_BAZEL_SRCS, + binary = "cargo-bazel", + cargo_lockfile = "@rules_rust//crate_universe:Cargo.lock", + cargo_toml = "@rules_rust//crate_universe:Cargo.toml", + version = rust_version, + # The increased timeout helps avoid flakes in CI + timeout = 900, + ) diff --git a/crate_universe/private/BUILD.bazel b/crate_universe/private/BUILD.bazel index 085fd55ed9..39f0969bcb 100644 --- a/crate_universe/private/BUILD.bazel +++ b/crate_universe/private/BUILD.bazel @@ -1,8 +1,24 @@ -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load(":bootstrap_utils.bzl", "srcs_module") -package(default_visibility = ["//visibility:public"]) +package(default_visibility = ["//:__subpackages__"]) -bzl_library( - name = "bzl_lib", - srcs = glob(["**/*.bzl"]), +exports_files(glob(["**"])) + +srcs_module( + name = "srcs_module", + srcs = "//crate_universe:rust_srcs", + dest = ":srcs.bzl", +) + +filegroup( + name = "bzl_srcs", + srcs = glob(["*.bzl"]), +) + +filegroup( + name = "distro", + srcs = glob(["*.bzl"]) + [ + "BUILD.bazel", + "//crate_universe/private/vendor:distro", + ], ) diff --git a/crate_universe/private/bootstrap/.bazelversion b/crate_universe/private/bootstrap/.bazelversion deleted file mode 100644 index 0c89fc927e..0000000000 --- a/crate_universe/private/bootstrap/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -4.0.0 \ No newline at end of file diff --git a/crate_universe/private/bootstrap/.gitignore b/crate_universe/private/bootstrap/.gitignore deleted file mode 100644 index 8a1e0c90cf..0000000000 --- a/crate_universe/private/bootstrap/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Bootstrapped binaries will go in `./bin` -bin/ - -# And to use the binaries as http_file repositories, we create -file/ - -# Bazel outputs -bazel-* diff --git a/crate_universe/private/bootstrap/BUILD.bazel b/crate_universe/private/bootstrap/BUILD.bazel deleted file mode 100644 index d181ab61c8..0000000000 --- a/crate_universe/private/bootstrap/BUILD.bazel +++ /dev/null @@ -1,50 +0,0 @@ -_COMMON_ENV = { - "CARGO": "$${PWD}/$(execpath //rust/toolchain:current_exec_cargo_files)", - "DETECT_CHANGES": "true", - "RUSTC": "$${PWD}/$(execpath //rust/toolchain:current_exec_rustc_files)", -} - -_ENV = select({ - "@rules_rust//rust/platform:aarch64-apple-darwin": dict(_COMMON_ENV.items() + { - "IS_WINDOWS": "false", - "TARGET": "aarch64-apple-darwin", - }.items()), - "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": dict(_COMMON_ENV.items() + { - "IS_WINDOWS": "false", - "TARGET": "aarch64-unknown-linux-gnu", - }.items()), - "@rules_rust//rust/platform:x86_64-apple-darwin": dict(_COMMON_ENV.items() + { - "IS_WINDOWS": "false", - "TARGET": "x86_64-apple-darwin", - }.items()), - "@rules_rust//rust/platform:x86_64-pc-windows-msvc": dict(_COMMON_ENV.items() + { - "IS_WINDOWS": "true", - "TARGET": "x86_64-pc-windows-gnu", - }.items()), - "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": dict(_COMMON_ENV.items() + { - "IS_WINDOWS": "false", - "TARGET": "x86_64-unknown-linux-gnu", - }.items()), -}) - -# Bootstrap the crate_universe resolver for the current exec platform -sh_binary( - name = "build", - srcs = ["build.sh"], - data = [ - ":cargo", - ":rustc", - ], - env = _ENV, - tags = ["requires-network"], -) - -sh_binary( - name = "install", - srcs = ["install.sh"], - data = [ - ":cargo", - ":rustc", - ], - env = _ENV, -) diff --git a/crate_universe/private/bootstrap/README.md b/crate_universe/private/bootstrap/README.md deleted file mode 100644 index 9a5f9e72bb..0000000000 --- a/crate_universe/private/bootstrap/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Crate Universe Bootstrap - -This workspace contains tools for bootstrapping `crate_universe` binaries. - -## Build - -Users can use Bazel to build a binary for the current host by running `bazel run //:build`. - -If a user is looking to build binaries for all supported platforms, they should simply run -`./build.sh` directly. - -### Dependencies - -When running `./build.sh` directly, the script expects [Cargo](https://doc.rust-lang.org/cargo/) to be -installed on the host and will attempt to find or install [cross](https://github.com/rust-embedded/cross) -which depends on [Docker](https://www.docker.com/). - -#### Installing Dependencies - -- `Cargo`: use [rustup](https://rustup.rs/). -- `Cross`: run `cargo install cross` -- `Docker`: Follow [this guide](https://docs.docker.com/engine/install/) - -### Artifacts - -Artifacts can be found in `./bin` once `./build.sh` is run. diff --git a/crate_universe/private/bootstrap/WORKSPACE.bazel b/crate_universe/private/bootstrap/WORKSPACE.bazel deleted file mode 100644 index 380a1d41d1..0000000000 --- a/crate_universe/private/bootstrap/WORKSPACE.bazel +++ /dev/null @@ -1,10 +0,0 @@ -workspace(name = "rules_rust_crate_universe_bootstrap") - -local_repository( - name = "rules_rust", - path = "../../..", -) - -load("@rules_rust//rust:repositories.bzl", "rust_repositories") - -rust_repositories() diff --git a/crate_universe/private/bootstrap/build.sh b/crate_universe/private/bootstrap/build.sh deleted file mode 100755 index c5aab4c767..0000000000 --- a/crate_universe/private/bootstrap/build.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -set -xeuo pipefail - -# Find the location of the script -if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then - SCRIPT_DIR="${BUILD_WORKSPACE_DIRECTORY}" -else - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -fi - -# All supported targets -if [[ $# -gt 0 ]]; then - TARGETS=("$@") -elif [[ -n "${TARGET:-}" ]]; then - TARGETS=("${TARGET}") -else - TARGETS=( - "aarch64-apple-darwin" - "aarch64-unknown-linux-gnu" - "x86_64-apple-darwin" - "x86_64-pc-windows-gnu" - "x86_64-unknown-linux-gnu" - ) -fi - -echo "TARGETS=${TARGETS[@]}" - -# Specify the path to the cargo manifest -MANIFEST="${SCRIPT_DIR}/../../Cargo.toml" - -# Resolve absolute paths that could potentially be in the cargo and rustc vars -CARGO="$(echo ${CARGO-cargo} | sed "s^\${PWD}^${PWD}^")" -RUSTC="$(echo ${RUSTC-rustc} | sed "s^\${PWD}^${PWD}^")" - -# If there are multiple targets or we're in github CI, ensure `cross` is installed -if [[ "${#TARGETS[@]}" != 1 || -n "${GITHUB_WORKFLOW:-}" ]]; then - - # Ensure we have an aboslute path to the cargo binary - ${CARGO} version - - # Ensure cross is installed which is used for bootstrapping on all platforms - if [[ -z "$(cross --version || echo '')" ]]; then - ${CARGO} install cross - fi - - BUILD_TOOL=cross -else - # Ensure rustc is set when using cargo - BUILD_TOOL="env RUSTC=${RUSTC} ${CARGO}" -fi - -# Fetch cargo dependencies in advance to streamline the build process -echo "Fetch cargo dependencies" -${CARGO} fetch --manifest-path="${MANIFEST}" - -if [[ -z "${OUT_DIR:-}" ]]; then - OUT_DIR="${SCRIPT_DIR}/bin" -fi - -# Because --target-dir does not work, we change directories and move built binaries after the fact -# https://github.com/rust-embedded/cross/issues/272 -pushd "$(dirname "${MANIFEST}")" - -# Build all binaries -for target in ${TARGETS[@]}; do - echo "Building for ${target}" - - if [[ "${target}" == *"windows"* ]]; then - bin_name=crate_universe_resolver.exe - else - bin_name=crate_universe_resolver - fi - - # This clean avoids linker issues - # https://github.com/rust-embedded/cross/issues/455 - ${CARGO} clean - - # Build the binary for the current target - ${BUILD_TOOL} build --release --locked --target="${target}" - - # Install it into the rules_rust repository - install_path="${OUT_DIR}/${target}/release/${bin_name}" - mkdir -p "$(dirname "${install_path}")" - cp -p "./target/${target}/release/${bin_name}" "${install_path}" -done -popd diff --git a/crate_universe/private/bootstrap/install.sh b/crate_universe/private/bootstrap/install.sh deleted file mode 100755 index 0ddee8b796..0000000000 --- a/crate_universe/private/bootstrap/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -# Find the location of the script -if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then - SCRIPT_DIR="${BUILD_WORKSPACE_DIRECTORY}" -else - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -fi - -if [[ "${IS_WINDOWS:-}" == "true" ]]; then - bin_name=crate_universe_resolver.exe - install_name=resolver.exe -else - bin_name=crate_universe_resolver - install_name=resolver -fi - -mkdir -p "${SCRIPT_DIR}/file" -touch "${SCRIPT_DIR}/file/BUILD.bazel" -cp "${SCRIPT_DIR}/bin/${TARGET}/release/${bin_name}" "${SCRIPT_DIR}/file/${install_name}" diff --git a/crate_universe/private/bootstrap_utils.bzl b/crate_universe/private/bootstrap_utils.bzl new file mode 100644 index 0000000000..9df387e9ed --- /dev/null +++ b/crate_universe/private/bootstrap_utils.bzl @@ -0,0 +1,106 @@ +"""Utilities directly related to bootstrapping `cargo-bazel`""" + +_SRCS_TEMPLATE = """\ +\"\"\"A generate file containing all source files used to produce `cargo-bazel`\"\"\" + +# Each source file is tracked as a target so the `cargo_bootstrap_repository` +# rule will know to automatically rebuild if any of the sources changed. +CARGO_BAZEL_SRCS = [ + {srcs} +] +""" + +def _srcs_module_impl(ctx): + srcs = ["@rules_rust{}".format(src.owner) for src in ctx.files.srcs] + if not srcs: + fail("`srcs` cannot be empty") + output = ctx.actions.declare_file(ctx.label.name) + + ctx.actions.write( + output = output, + content = _SRCS_TEMPLATE.format( + srcs = "\n ".join(["\"{}\",".format(src) for src in srcs]), + ), + ) + + return DefaultInfo( + files = depset([output]), + ) + +_srcs_module = rule( + doc = "A rule for writing a list of sources to a templated file", + implementation = _srcs_module_impl, + attrs = { + "srcs": attr.label( + doc = "A filegroup of source files", + allow_files = True, + ), + }, +) + +_INSTALLER_TEMPLATE = """\ +#!/bin/bash +set -euo pipefail +cp -f "{path}" "${{BUILD_WORKSPACE_DIRECTORY}}/{dest}" +""" + +def _srcs_installer_impl(ctx): + output = ctx.actions.declare_file(ctx.label.name + ".sh") + target_file = ctx.file.input + dest = ctx.file.dest.short_path + + ctx.actions.write( + output = output, + content = _INSTALLER_TEMPLATE.format( + path = target_file.short_path, + dest = dest, + ), + is_executable = True, + ) + + return DefaultInfo( + files = depset([output]), + runfiles = ctx.runfiles(files = [target_file]), + executable = output, + ) + +_srcs_installer = rule( + doc = "A rule for writing a file back to the repository", + implementation = _srcs_installer_impl, + attrs = { + "dest": attr.label( + doc = "the file name to use for installation", + allow_single_file = True, + mandatory = True, + ), + "input": attr.label( + doc = "The file to write back to the repository", + allow_single_file = True, + mandatory = True, + ), + }, + executable = True, +) + +def srcs_module(name, dest, **kwargs): + """A helper rule to ensure the bootstrapping functionality of `cargo-bazel` is always up to date + + Args: + name (str): The name of the sources module + dest (str): The filename the module should be written as in the current package. + **kwargs (dict): Additional keyword arguments + """ + tags = kwargs.pop("tags", []) + + _srcs_module( + name = name, + tags = tags, + **kwargs + ) + + _srcs_installer( + name = name + ".install", + input = name, + dest = dest, + tags = tags, + ) diff --git a/crate_universe/private/common_utils.bzl b/crate_universe/private/common_utils.bzl new file mode 100644 index 0000000000..ae65b6337a --- /dev/null +++ b/crate_universe/private/common_utils.bzl @@ -0,0 +1,109 @@ +"""Common utilities useful for unifying the behavior of different parts of `cargo-bazel`.""" + +# buildifier: disable=bzl-visibility +load( + "//cargo/private:cargo_utils.bzl", + _get_host_triple = "get_host_triple", + _rust_get_rust_tools = "get_rust_tools", +) + +get_host_triple = _get_host_triple + +CARGO_BAZEL_ISOLATED = "CARGO_BAZEL_ISOLATED" + +_EXECUTE_ERROR_MESSAGE = """\ +Command {args} failed with exit code {exit_code}. +STDOUT ------------------------------------------------------------------------ +{stdout} +STDERR ------------------------------------------------------------------------ +{stderr} +""" + +def execute(repository_ctx, args, env = {}): + """A heler macro for executing some arguments and displaying nicely formatted errors + + Args: + repository_ctx (repository_ctx): The rule's context object. + args (list): A list of strings which act as `argv` for execution. + env (dict, optional): Environment variables to set in the execution environment. + + Returns: + struct: The results of `repository_ctx.execute` + """ + result = repository_ctx.execute( + args, + environment = env, + quiet = repository_ctx.attr.quiet, + ) + + if result.return_code: + fail(_EXECUTE_ERROR_MESSAGE.format( + args = args, + exit_code = result.return_code, + stdout = result.stdout, + stderr = result.stderr, + )) + + return result + +def get_rust_tools(repository_ctx, host_triple): + """Retrieve a cargo and rustc binary based on the host triple. + + Args: + repository_ctx (repository_ctx): The rule's context object. + host_triple (struct): A `@rules_rust//rust:triple.bzl%triple` object. + + Returns: + struct: A struct containing the expected rust tools + """ + + # This is a bit hidden but to ensure Cargo behaves consistently based + # on the user provided config file, the config file is installed into + # the `CARGO_HOME` path. This is done so here since fetching tools + # is expected to always occur before any subcommands are run. + if repository_ctx.attr.isolated and repository_ctx.attr.cargo_config: + cargo_home = _cargo_home_path(repository_ctx) + cargo_home_config = repository_ctx.path("{}/config.toml".format(cargo_home)) + cargo_config = repository_ctx.path(repository_ctx.attr.cargo_config) + repository_ctx.symlink(cargo_config, cargo_home_config) + + return _rust_get_rust_tools( + cargo_template = repository_ctx.attr.rust_toolchain_cargo_template, + rustc_template = repository_ctx.attr.rust_toolchain_rustc_template, + host_triple = host_triple, + version = repository_ctx.attr.rust_version, + ) + +def _cargo_home_path(repository_ctx): + """Define a path within the repository to use in place of `CARGO_HOME` + + Args: + repository_ctx (repository_ctx): The rules context object + + Returns: + path: The path to a directory to use as `CARGO_HOME` + """ + return repository_ctx.path(".cargo_home") + +def cargo_environ(repository_ctx): + """Define Cargo environment varables for use with `cargo-bazel` + + Args: + repository_ctx (repository_ctx): The rules context object + + Returns: + dict: A set of environment variables for `cargo-bazel` executions + """ + env = dict() + + if CARGO_BAZEL_ISOLATED in repository_ctx.os.environ: + if repository_ctx.os.environ[CARGO_BAZEL_ISOLATED].lower() in ["true", "1", "yes", "on"]: + env.update({ + "CARGO_HOME": str(_cargo_home_path(repository_ctx)), + }) + elif repository_ctx.attr.isolated: + env.update({ + "CARGO_HOME": str(_cargo_home_path(repository_ctx)), + }) + + return env diff --git a/crate_universe/private/crate.bzl b/crate_universe/private/crate.bzl new file mode 100644 index 0000000000..611bf62826 --- /dev/null +++ b/crate_universe/private/crate.bzl @@ -0,0 +1,172 @@ +"""Macros used for represeting crates or annotations for existing crates""" + +def _workspace_member(version, sha256 = None): + """Define information for extra workspace members + + Args: + version (str): The semver of the crate to download. Must be an exact version. + sha256 (str, optional): The sha256 checksum of the `.crate` file. + + Returns: + string: A json encoded string of all inputs + """ + return json.encode(struct( + version = version, + sha256 = sha256, + )) + +def _spec( + package = None, + version = None, + default_features = True, + features = [], + git = None, + rev = None): + """A constructor for a crate dependency. + + See [specifying dependencies][sd] in the Cargo book for more details. + + [sd]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html + + Args: + package (str, optional): The explicit name of the package (used when attempting to alias a crate). + version (str, optional): The exact version of the crate. Cannot be used with `git`. + default_features (bool, optional): Maps to the `default-features` flag. + features (list, optional): A list of features to use for the crate + git (str, optional): The Git url to use for the crate. Cannot be used with `version`. + rev (str, optional): The git revision of the remote crate. Tied with the `git` param. + + Returns: + string: A json encoded string of all inputs + """ + return json.encode(struct( + package = package, + default_features = default_features, + features = features, + version = version, + git = git, + rev = rev, + )) + +def _assert_absolute(label): + """Ensure a given label is an absolute label + + Args: + label (Label): The label to check + """ + label_str = str(label) + if not label.startswith("@"): + fail("The labels must be absolute. Please update '{}'".format( + label_str, + )) + +def _annotation( + version = "*", + additive_build_file = None, + additive_build_file_content = None, + build_script_data = None, + build_script_data_glob = None, + build_script_deps = None, + build_script_env = None, + build_script_proc_macro_deps = None, + build_script_rustc_env = None, + compile_data = None, + compile_data_glob = None, + crate_features = None, + data = None, + data_glob = None, + deps = None, + gen_build_script = None, + patch_args = None, + patch_tool = None, + patches = None, + proc_macro_deps = None, + rustc_env = None, + rustc_env_files = None, + rustc_flags = None, + shallow_since = None): + """A collection of extra attributes and settings for a particular crate + + Args: + version (str, optional): The version or semver-conditions to match with a crate. + additive_build_file_content (str, optional): Extra contents to write to the bottom of generated BUILD files. + additive_build_file (str, optional): A file containing extra contents to write to the bottom of + generated BUILD files. + build_script_data (list, optional): A list of labels to add to a crate's `cargo_build_script::data` attribute. + build_script_data_glob (list, optional): A list of glob patterns to add to a crate's `cargo_build_script::data` + attribute. + build_script_deps (list, optional): A list of labels to add to a crate's `cargo_build_script::deps` attribute. + build_script_env (dict, optional): Additional environment variables to set on a crate's + `cargo_build_script::env` attribute. + build_script_proc_macro_deps (list, optional): A list of labels to add to a crate's + `cargo_build_script::proc_macro_deps` attribute. + build_script_rustc_env (dict, optional): Additional environment variables to set on a crate's + `cargo_build_script::env` attribute. + compile_data (list, optional): A list of labels to add to a crate's `rust_library::compile_data` attribute. + compile_data_glob (list, optional): A list of glob patterns to add to a crate's `rust_library::compile_data` + attribute. + crate_features (list, optional): A list of strings to add to a crate's `rust_library::crate_features` + attribute. + data (list, optional): A list of labels to add to a crate's `rust_library::data` attribute. + data_glob (list, optional): A list of glob patterns to add to a crate's `rust_library::data` attribute. + deps (list, optional): A list of labels to add to a crate's `rust_library::deps` attribute. + gen_build_script (bool, optional): An authorative flag to determine whether or not to produce + `cargo_build_script` targets for the current crate. + patch_args (list, optional): The `patch_args` attribute of a Bazel repository rule. See + [http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args) + patch_tool (list, optional): The `patch_tool` attribute of a Bazel repository rule. See + [http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool) + patches (list, optional): The `patches` attribute of a Bazel repository rule. See + [http_archive.patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches) + proc_macro_deps (list, optional): A list of labels to add to a crate's `rust_library::proc_macro_deps` + attribute. + rustc_env (dict, optional): Additional variables to set on a crate's `rust_library::rustc_env` attribute. + rustc_env_files (list, optional): A list of labels to set on a crate's `rust_library::rustc_env_files` + attribute. + rustc_flags (list, optional): A list of strings to set on a crate's `rust_library::rustc_flags` attribute. + shallow_since (str, optional): An optional timestamp used for crates originating from a git repository + instead of a crate registry. This flag optimizes fetching the source code. + + Returns: + string: A json encoded string containing the specified version and separately all other inputs. + """ + if additive_build_file: + _assert_absolute(additive_build_file) + if patches: + for patch in patches: + _assert_absolute(patch) + + return json.encode(( + version, + struct( + additive_build_file = additive_build_file, + additive_build_file_content = additive_build_file_content, + build_script_data = build_script_data, + build_script_data_glob = build_script_data_glob, + build_script_deps = build_script_deps, + build_script_env = build_script_env, + build_script_proc_macro_deps = build_script_proc_macro_deps, + build_script_rustc_env = build_script_rustc_env, + compile_data = compile_data, + compile_data_glob = compile_data_glob, + crate_features = crate_features, + data = data, + data_glob = data_glob, + deps = deps, + gen_build_script = gen_build_script, + patch_args = patch_args, + patch_tool = patch_tool, + patches = patches, + proc_macro_deps = proc_macro_deps, + rustc_env = rustc_env, + rustc_env_files = rustc_env_files, + rustc_flags = rustc_flags, + shallow_since = shallow_since, + ), + )) + +crate = struct( + spec = _spec, + annotation = _annotation, + workspace_member = _workspace_member, +) diff --git a/crate_universe/private/crates_repository.bzl b/crate_universe/private/crates_repository.bzl new file mode 100644 index 0000000000..92def09acc --- /dev/null +++ b/crate_universe/private/crates_repository.bzl @@ -0,0 +1,244 @@ +"""`crates_repository` rule implementation""" + +load("//crate_universe/private:common_utils.bzl", "get_host_triple", "get_rust_tools") +load( + "//crate_universe/private:generate_utils.bzl", + "CRATES_REPOSITORY_ENVIRON", + "determine_repin", + "execute_generator", + "generate_config", + "get_generator", + "get_lockfile", +) +load( + "//crate_universe/private:splicing_utils.bzl", + "create_splicing_manifest", + "splice_workspace_manifest", +) +load("//crate_universe/private:urls.bzl", "CARGO_BAZEL_SHA256S", "CARGO_BAZEL_URLS") +load("//rust:defs.bzl", "rust_common") +load("//rust/platform:triple_mappings.bzl", "SUPPORTED_PLATFORM_TRIPLES") + +def _crates_repository_impl(repository_ctx): + # Determine the current host's platform triple + host_triple = get_host_triple(repository_ctx) + + # Locate the generator to use + generator, generator_sha256 = get_generator(repository_ctx, host_triple.triple) + + # Generate a config file for all settings + config = generate_config(repository_ctx) + + # Locate the lockfile + lockfile = get_lockfile(repository_ctx) + + # Locate Rust tools (cargo, rustc) + tools = get_rust_tools(repository_ctx, host_triple) + cargo_path = repository_ctx.path(tools.cargo) + rustc_path = repository_ctx.path(tools.rustc) + + # Create a manifest of all dependency inputs + splicing_manifest = create_splicing_manifest(repository_ctx) + + # Determine whether or not to repin depednencies + repin = determine_repin( + repository_ctx = repository_ctx, + generator = generator, + lockfile_path = lockfile.path, + lockfile_kind = lockfile.kind, + config = config.path, + splicing_manifest = splicing_manifest, + cargo = cargo_path, + rustc = rustc_path, + ) + + # If re-pinning is enabled, gather additional inputs for the generator + kwargs = dict() + if repin or lockfile.kind == "cargo": + # Generate a top level Cargo workspace and manifest for use in generation + metadata_path = splice_workspace_manifest( + repository_ctx = repository_ctx, + generator = generator, + lockfile = lockfile, + splicing_manifest = splicing_manifest, + cargo = cargo_path, + rustc = rustc_path, + ) + + kwargs.update({ + "metadata": metadata_path, + "repin": True, + }) + + # Run the generator + execute_generator( + repository_ctx = repository_ctx, + generator = generator, + config = config.path, + splicing_manifest = splicing_manifest, + lockfile_path = lockfile.path, + lockfile_kind = lockfile.kind, + repository_dir = repository_ctx.path("."), + cargo = cargo_path, + rustc = rustc_path, + # sysroot = tools.sysroot, + **kwargs + ) + + # Determine the set of reproducible values + attrs = {attr: getattr(repository_ctx.attr, attr) for attr in dir(repository_ctx.attr)} + exclude = ["to_json", "to_proto"] + for attr in exclude: + attrs.pop(attr, None) + + # Note that this is only scoped to the current host platform. Users should + # ensure they provide all the values necessary for the host environments + # they support + if generator_sha256: + attrs.update({"generator_sha256s": generator_sha256}) + + return attrs + +crates_repository = repository_rule( + doc = """\ +A rule for defining and downloading Rust dependencies (crates). + +Environment Variables: + +| variable | usage | +| --- | --- | +| `CARGO_BAZEL_GENERATOR_SHA256` | The sha256 checksum of the file located at `CARGO_BAZEL_GENERATOR_URL` | +| `CARGO_BAZEL_GENERATOR_URL` | The URL of a cargo-bazel binary. This variable takes precedence over attributes and can use `file://` for local paths | +| `CARGO_BAZEL_ISOLATED` | An authorative flag as to whether or not the `CARGO_HOME` environment variable should be isolated from the host configuration | +| `CARGO_BAZEL_REPIN` | An indicator that the dependencies represented by the rule should be regenerated. `REPIN` may also be used. | + +""", + implementation = _crates_repository_impl, + attrs = { + "annotations": attr.string_list_dict( + doc = "Extra settings to apply to crates. See [crate.annotations](#crateannotations).", + ), + "cargo_config": attr.label( + doc = "A [Cargo configuration](https://doc.rust-lang.org/cargo/reference/config.html) file", + ), + "extra_workspace_member_url_template": attr.string( + doc = "The registry url to use when fetching extra workspace members", + default = "https://crates.io/api/v1/crates/{name}/{version}/download", + ), + "extra_workspace_members": attr.string_dict( + doc = ( + "Additional crates to download and include as a workspace member. This is unfortunately required in " + + "order to add information about \"binary-only\" crates so that a `rust_binary` may be generated for " + + "it. [rust-lang/cargo#9096](https://github.com/rust-lang/cargo/issues/9096) tracks an RFC which may " + + "solve for this." + ), + ), + "generate_build_scripts": attr.bool( + doc = ( + "Whether or not to generate " + + "[cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default." + ), + default = True, + ), + "generator": attr.string( + doc = ( + "The absolute label of a generator. Eg. `@cargo_bazel_bootstrap//:cargo-bazel`. " + + "This is typically used when bootstrapping" + ), + ), + "generator_sha256s": attr.string_dict( + doc = "Dictionary of `host_triple` -> `sha256` for a `cargo-bazel` binary.", + default = CARGO_BAZEL_SHA256S, + ), + "generator_urls": attr.string_dict( + doc = ( + "URL template from which to download the `cargo-bazel` binary. `{host_triple}` and will be " + + "filled in according to the host platform." + ), + default = CARGO_BAZEL_URLS, + ), + "isolated": attr.bool( + doc = ( + "If true, `CARGO_HOME` will be overwritten to a directory within the generated repository in " + + "order to prevent other uses of Cargo from impacting having any effect on the generated targets " + + "produced by this rule. For users who either have multiple `crate_repository` definitions in a " + + "WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This " + + "variable is also controled by `CARGO_BAZEL_ISOLATED` environment variable." + ), + default = True, + ), + "lockfile": attr.label( + doc = ( + "The path to a file to use for reproducible renderings. Two kinds of lock files are supported, " + + "Cargo (`Cargo.lock` files) and Bazel (custom files generated by this rule, naming is irrelevant). " + + "Bazel lockfiles should be the prefered kind as they're desigend with Bazel's notions of " + + "reporducibility in mind. Cargo lockfiles can be used in cases where it's intended to be the " + + "source of truth, but more work will need to be done to generate BUILD files which are not " + + "guaranteed to be determinsitic." + ), + mandatory = True, + ), + "lockfile_kind": attr.string( + doc = ( + "Two different kinds of lockfiles are supported, the custom \"Bazel\" lockfile, which is generated " + + "by this rule, and Cargo lockfiles (`Cargo.lock`). This attribute allows for explicitly defining " + + "the type in cases where it may not be auto-detectable." + ), + values = [ + "auto", + "bazel", + "cargo", + ], + default = "auto", + ), + "manifests": attr.label_list( + doc = "A list of Cargo manifests (`Cargo.toml` files).", + ), + "packages": attr.string_dict( + doc = "A set of crates (packages) specifications to depend on. See [crate.spec](#crate.spec).", + ), + "quiet": attr.bool( + doc = "If stdout and stderr should not be printed to the terminal.", + default = True, + ), + "render_config": attr.string( + doc = ( + "The configuration flags to use for rendering. Use `//crate_universe:defs.bzl\\%render_config` to " + + "generate the value for this field. If unset, the defaults defined there will be used." + ), + ), + "rust_toolchain_cargo_template": attr.string( + doc = ( + "The template to use for finding the host `cargo` binary. `{version}` (eg. '1.53.0'), " + + "`{triple}` (eg. 'x86_64-unknown-linux-gnu'), `{arch}` (eg. 'aarch64'), `{vendor}` (eg. 'unknown'), " + + "`{system}` (eg. 'darwin'), `{cfg}` (eg. 'exec'), and `{tool}` (eg. 'rustc.exe') will be replaced in " + + "the string if present." + ), + default = "@rust_{system}_{arch}//:bin/{tool}", + ), + "rust_toolchain_rustc_template": attr.string( + doc = ( + "The template to use for finding the host `rustc` binary. `{version}` (eg. '1.53.0'), " + + "`{triple}` (eg. 'x86_64-unknown-linux-gnu'), `{arch}` (eg. 'aarch64'), `{vendor}` (eg. 'unknown'), " + + "`{system}` (eg. 'darwin'), `{cfg}` (eg. 'exec'), and `{tool}` (eg. 'cargo.exe') will be replaced in " + + "the string if present." + ), + default = "@rust_{system}_{arch}//:bin/{tool}", + ), + "rust_version": attr.string( + doc = "The version of Rust the currently registered toolchain is using. Eg. `1.56.0`, or `nightly-2021-09-08`", + default = rust_common.default_version, + ), + "splicing_config": attr.string( + doc = ( + "The configuration flags to use for splicing Cargo maniests. Use `//crate_universe:defs.bzl\\%rsplicing_config` to " + + "generate the value for this field. If unset, the defaults defined there will be used." + ), + ), + "supported_platform_triples": attr.string_list( + doc = "A set of all platform triples to consider when generating dependencies.", + default = SUPPORTED_PLATFORM_TRIPLES, + ), + }, + environ = CRATES_REPOSITORY_ENVIRON, +) diff --git a/crate_universe/private/crates_vendor.bzl b/crate_universe/private/crates_vendor.bzl new file mode 100644 index 0000000000..6890cf98aa --- /dev/null +++ b/crate_universe/private/crates_vendor.bzl @@ -0,0 +1,334 @@ +"""Rules for vendoring Bazel targets into existing workspaces""" + +load("//crate_universe/private:generate_utils.bzl", "collect_crate_annotations", "render_config") +load("//crate_universe/private:splicing_utils.bzl", "splicing_config") +load("//crate_universe/private:urls.bzl", "CARGO_BAZEL_LABEL") +load("//rust/platform:triple_mappings.bzl", "SUPPORTED_PLATFORM_TRIPLES") + +_UNIX_WRAPPER = """\ +#!/usr/bin/env bash +set -euo pipefail +export RUNTIME_PWD="$(pwd)" +eval exec env - BUILD_WORKSPACE_DIRECTORY="${{BUILD_WORKSPACE_DIRECTORY}}" {env} \\ +"{bin}" {args} "$@" +""" + +_WINDOWS_WRAPPER = """\ +@ECHO OFF +set RUNTIME_PWD=%CD% +{env} + +call {bin} {args} %@% +""" + +CARGO_BAZEL_GENERATOR_PATH = "CARGO_BAZEL_GENERATOR_PATH" + +def _runfiles_path(path, is_windows): + if is_windows: + runtime_pwd_var = "%RUNTIME_PWD%" + else: + runtime_pwd_var = "${RUNTIME_PWD}" + if path.startswith("../"): + return "{}/external/{}".format(runtime_pwd_var, path[len("../"):]) + return "{}/{}".format(runtime_pwd_var, path) + +def _is_windows(ctx): + toolchain = ctx.toolchains[Label("@rules_rust//rust:toolchain")] + return "windows" in toolchain.target_triple + +def _get_output_package(ctx): + # Determine output directory + if ctx.attr.vendor_path.startswith("/"): + output = ctx.attr.vendor_path + else: + output = "{}/{}".format( + ctx.label.package, + ctx.attr.vendor_path, + ) + return output + +def _write_data_file(ctx, name, data): + file = ctx.actions.declare_file("{}.{}".format(ctx.label.name, name)) + ctx.actions.write( + output = file, + content = data, + ) + return file + +def _write_splicing_manifest(ctx): + # Deserialize information about direct packges + direct_packages_info = { + pkg: json.decode(data) + for (pkg, data) in ctx.attr.packages.items() + } + + # Manifests are required to be single files + manifests = {m[DefaultInfo].files.to_list()[0].short_path: str(m.label) for m in ctx.attr.manifests} + + config = json.decode(ctx.attr.splicing_config or splicing_config()) + splicing_manifest_content = { + # TODO: How do cargo config files get factored into vendored builds + "cargo_config": None, + "direct_packages": direct_packages_info, + "manifests": manifests, + } + + manifest = _write_data_file( + ctx = ctx, + name = "cargo-bazel-splicing-manifest.json", + data = json.encode_indent( + dict(dict(config).items() + splicing_manifest_content.items()), + indent = " " * 4, + ), + ) + + is_windows = _is_windows(ctx) + + args = ["--splicing-manifest", _runfiles_path(manifest.short_path, is_windows)] + runfiles = [manifest] + return args, runfiles + +def _write_extra_manifests_manifest(ctx): + manifest = _write_data_file( + ctx = ctx, + name = "cargo-bazel-extra-manifests-manifest.json", + data = json.encode(struct( + # TODO: This is for extra workspace members + manifests = [], + )), + ) + is_windows = _is_windows(ctx) + args = ["--extra-manifests-manifest", _runfiles_path(manifest.short_path, is_windows)] + runfiles = [manifest] + return args, runfiles + +def _write_config_file(ctx): + annotations = collect_crate_annotations(ctx.attr.annotations, str(ctx.label)) + unexpected = [] + for id, annotation in annotations.items(): + if annotation.get("additive_build_file", None): + unexpected.append(id) + if unexpected: + fail("The following annotations use `additive_build_file` which is not supported for `crates_vendor`: {}".format(unexpected)) + + rendering_config = dict(json.decode(render_config())) + + output_pkg = _get_output_package(ctx) + + if ctx.attr.mode == "local": + build_file_base_template = "@{}//{}/{{name}}-{{version}}:BUILD.bazel" + crate_label_template = "//{}/{{name}}-{{version}}:{{target}}".format( + output_pkg, + ) + else: + build_file_base_template = "@{}//{}:BUILD.{{name}}-{{version}}.bazel" + crate_label_template = rendering_config["crate_label_template"] + + rendering_config.update({ + "build_file_template": build_file_base_template.format( + ctx.workspace_name, + output_pkg, + ), + "crate_label_template": crate_label_template, + "crates_module_template": "@{}//{}:{{file}}".format( + ctx.workspace_name, + output_pkg, + ), + "repository_name": ctx.attr.repository_name or ctx.label.name, + "vendor_mode": ctx.attr.mode, + }) + + config_data = struct( + annotations = annotations, + rendering = rendering_config, + generate_build_scripts = ctx.attr.generate_build_scripts, + cargo_config = None, + supported_platform_triples = ctx.attr.supported_platform_triples, + ) + + config = _write_data_file( + ctx = ctx, + name = "cargo-bazel-config.json", + data = json.encode_indent( + config_data, + indent = " " * 4, + ), + ) + + is_windows = _is_windows(ctx) + args = ["--config", _runfiles_path(config.short_path, is_windows)] + runfiles = [config] + ctx.files.manifests + return args, runfiles + +def _crates_vendor_impl(ctx): + toolchain = ctx.toolchains[Label("@rules_rust//rust:toolchain")] + is_windows = _is_windows(ctx) + + environ = { + "CARGO": _runfiles_path(toolchain.cargo.short_path, is_windows), + "RUSTC": _runfiles_path(toolchain.rustc.short_path, is_windows), + } + + args = ["vendor"] + + cargo_bazel_runfiles = [] + + # Allow action envs to override the use of the cargo-bazel target. + if CARGO_BAZEL_GENERATOR_PATH in ctx.var: + bin_path = ctx.var[CARGO_BAZEL_GENERATOR_PATH] + elif ctx.executable.cargo_bazel: + bin_path = _runfiles_path(ctx.executable.cargo_bazel.short_path, is_windows) + cargo_bazel_runfiles.append(ctx.executable.cargo_bazel) + else: + fail("{} is missing either the `cargo_bazel` attribute or the '{}' action env".format( + ctx.label, + CARGO_BAZEL_GENERATOR_PATH, + )) + + # Generate config file + config_args, config_runfiles = _write_config_file(ctx) + args.extend(config_args) + cargo_bazel_runfiles.extend(config_runfiles) + + # Generate splicing manifest + splicing_manifest_args, splicing_manifest_runfiles = _write_splicing_manifest(ctx) + args.extend(splicing_manifest_args) + cargo_bazel_runfiles.extend(splicing_manifest_runfiles) + + # Generate extra-manifests manifest + extra_manifests_manifest_args, extra_manifests_manifest_runfiles = _write_extra_manifests_manifest(ctx) + args.extend(extra_manifests_manifest_args) + cargo_bazel_runfiles.extend(extra_manifests_manifest_runfiles) + + # Optionally include buildifier + if ctx.attr.buildifier: + args.extend(["--buildifier", _runfiles_path(ctx.executable.buildifier.short_path, is_windows)]) + cargo_bazel_runfiles.append(ctx.executable.buildifier) + + # Dtermine platform specific settings + if is_windows: + extension = ".bat" + template = _WINDOWS_WRAPPER + env_template = "\nset {}={}" + else: + extension = ".sh" + template = _UNIX_WRAPPER + env_template = "{}={}" + + # Write the wrapper script + runner = ctx.actions.declare_file(ctx.label.name + extension) + ctx.actions.write( + output = runner, + content = template.format( + env = " ".join([env_template.format(key, val) for key, val in environ.items()]), + bin = bin_path, + args = " ".join(args), + ), + is_executable = True, + ) + + return DefaultInfo( + files = depset([runner]), + runfiles = ctx.runfiles( + files = cargo_bazel_runfiles, + transitive_files = toolchain.all_files, + ), + executable = runner, + ) + +crates_vendor = rule( + implementation = _crates_vendor_impl, + doc = "A rule for defining Rust dependencies (crates) and writing targets for them to the current workspace", + attrs = { + "annotations": attr.string_list_dict( + doc = "Extra settings to apply to crates. See [crate.annotations](#crateannotations).", + ), + "buildifier": attr.label( + doc = "The path to a [buildifier](https://github.com/bazelbuild/buildtools/blob/5.0.1/buildifier/README.md) binary used to format generated BUILD files.", + cfg = "exec", + executable = True, + default = Label("//crate_universe/private/vendor:buildifier"), + ), + "cargo_bazel": attr.label( + doc = ( + "The cargo-bazel binary to use for vendoring. If this attribute is not set, then a " + + "`{}` action env will be used.".format(CARGO_BAZEL_GENERATOR_PATH) + ), + cfg = "exec", + executable = True, + allow_files = True, + default = CARGO_BAZEL_LABEL, + ), + "generate_build_scripts": attr.bool( + doc = ( + "Whether or not to generate " + + "[cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default." + ), + default = True, + ), + "manifests": attr.label_list( + doc = "A list of Cargo manifests (`Cargo.toml` files).", + allow_files = ["Cargo.toml"], + ), + "mode": attr.string( + doc = ( + "Flags determining how crates should be vendored. `local` is where crate source and BUILD files are " + + "written to the repository. `remote` is where only BUILD files are written and repository rules " + + "used to fetch source code." + ), + values = [ + "local", + "remote", + ], + default = "remote", + ), + "packages": attr.string_dict( + doc = "A set of crates (packages) specifications to depend on. See [crate.spec](#crate.spec).", + ), + "repository_name": attr.string( + doc = "The name of the repository to generate for `remote` vendor modes. If unset, the label name will be used", + ), + "splicing_config": attr.string( + doc = ( + "The configuration flags to use for splicing Cargo maniests. Use `//crate_universe:defs.bzl\\%rsplicing_config` to " + + "generate the value for this field. If unset, the defaults defined there will be used." + ), + ), + "supported_platform_triples": attr.string_list( + doc = "A set of all platform triples to consider when generating dependencies.", + default = SUPPORTED_PLATFORM_TRIPLES, + ), + "vendor_path": attr.string( + doc = "The path to a directory to write files into. Absolute paths will be treated as relative to the workspace root", + default = "crates", + ), + }, + executable = True, + toolchains = ["@rules_rust//rust:toolchain"], +) + +def _crates_vendor_remote_repository_impl(repository_ctx): + build_file = repository_ctx.path(repository_ctx.attr.build_file) + defs_module = repository_ctx.path(repository_ctx.attr.defs_module) + + repository_ctx.file("BUILD.bazel", repository_ctx.read(build_file)) + repository_ctx.file("defs.bzl", repository_ctx.read(defs_module)) + repository_ctx.file("crates.bzl", "") + repository_ctx.file("WORKSPACE.bazel", """workspace(name = "{}")""".format( + repository_ctx.name, + )) + +crates_vendor_remote_repository = repository_rule( + doc = "Creates a repository paired with `crates_vendor` targets using the `remote` vendor mode.", + implementation = _crates_vendor_remote_repository_impl, + attrs = { + "build_file": attr.label( + doc = "The BUILD file to use for the root package", + mandatory = True, + ), + "defs_module": attr.label( + doc = "The `defs.bzl` file to use in the repository", + mandatory = True, + ), + }, +) diff --git a/crate_universe/private/defaults.bzl b/crate_universe/private/defaults.bzl deleted file mode 100644 index 4b46b271ea..0000000000 --- a/crate_universe/private/defaults.bzl +++ /dev/null @@ -1,15 +0,0 @@ -"""A module defining generated information about crate_universe dependencies""" - -# This global should match the current release of `crate_unvierse`. -DEFAULT_URL_TEMPLATE = "{host_triple}{extension}" - -# Note that if any additional platforms are added here, the pipeline defined -# by `pre-release.yaml` should also be updated. The current shas are from -# release canddidate {rc} -DEFAULT_SHA256_CHECKSUMS = { - "aarch64-apple-darwin": "{aarch64-apple-darwin--sha256}", - "aarch64-unknown-linux-gnu": "{aarch64-unknown-linux-gnu--sha256}", - "x86_64-apple-darwin": "{x86_64-apple-darwin--sha256}", - "x86_64-pc-windows-gnu": "{x86_64-pc-windows-gnu--sha256}", - "x86_64-unknown-linux-gnu": "{x86_64-unknown-linux-gnu--sha256}", -} diff --git a/crate_universe/private/defaults.bzl.template b/crate_universe/private/defaults.bzl.template deleted file mode 100644 index 73b1c72a2a..0000000000 --- a/crate_universe/private/defaults.bzl.template +++ /dev/null @@ -1,15 +0,0 @@ -"""A module defining generated information about crate_universe dependencies""" - -# This global should match the current release of `crate_unvierse`. -DEFAULT_URL_TEMPLATE = "{DEFAULT_URL_TEMPLATE}" - -# Note that if any additional platforms are added here, the pipeline defined -# by `pre-release.yaml` should also be updated. The current shas are from -# release canddidate {rc} -DEFAULT_SHA256_CHECKSUMS = { - "aarch64-apple-darwin": "{aarch64-apple-darwin--sha256}", - "aarch64-unknown-linux-gnu": "{aarch64-unknown-linux-gnu--sha256}", - "x86_64-apple-darwin": "{x86_64-apple-darwin--sha256}", - "x86_64-pc-windows-gnu": "{x86_64-pc-windows-gnu--sha256}", - "x86_64-unknown-linux-gnu": "{x86_64-unknown-linux-gnu--sha256}", -} diff --git a/crate_universe/private/generate_utils.bzl b/crate_universe/private/generate_utils.bzl new file mode 100644 index 0000000000..de474c9b99 --- /dev/null +++ b/crate_universe/private/generate_utils.bzl @@ -0,0 +1,410 @@ +"""Utilities directly related to the `generate` step of `cargo-bazel`.""" + +load(":common_utils.bzl", "CARGO_BAZEL_ISOLATED", "cargo_environ", "execute") + +CARGO_BAZEL_GENERATOR_SHA256 = "CARGO_BAZEL_GENERATOR_SHA256" +CARGO_BAZEL_GENERATOR_URL = "CARGO_BAZEL_GENERATOR_URL" +CARGO_BAZEL_REPIN = "CARGO_BAZEL_REPIN" +REPIN = "REPIN" + +GENERATOR_ENV_VARS = [ + CARGO_BAZEL_GENERATOR_URL, + CARGO_BAZEL_GENERATOR_SHA256, +] + +REPIN_ENV_VARS = [ + REPIN, + CARGO_BAZEL_REPIN, +] + +CRATES_REPOSITORY_ENVIRON = GENERATOR_ENV_VARS + REPIN_ENV_VARS + [ + CARGO_BAZEL_ISOLATED, +] + +def get_generator(repository_ctx, host_triple): + """Query network resources to locate a `cargo-bazel` binary + + Args: + repository_ctx (repository_ctx): The rule's context object. + host_triple (string): A string representing the host triple + + Returns: + tuple(path, dict): The path to a `cargo-bazel` binary and the host sha256 pairing. + The pairing (dict) may be `None` if there is no need to update the attribute + """ + use_environ = False + for var in GENERATOR_ENV_VARS: + if var in repository_ctx.os.environ: + use_environ = True + + output = repository_ctx.path("cargo-bazel.exe" if "win" in repository_ctx.os.name else "cargo-bazel") + + # The `generator` attribute is the next highest priority behind + # environment variables. We check those first before deciding to + # use an explicitly provided variable. + if not use_environ and repository_ctx.attr.generator: + generator = repository_ctx.path(Label(repository_ctx.attr.generator)) + + # Resolve a few levels of symlinks to ensure we're accessing the direct binary + for _ in range(1, 100): + real_generator = generator.realpath + if real_generator == generator: + break + generator = real_generator + return generator, None + + # The environment variable will take precedence if set + if use_environ: + generator_sha256 = repository_ctx.os.environ.get(CARGO_BAZEL_GENERATOR_SHA256) + generator_url = repository_ctx.os.environ.get(CARGO_BAZEL_GENERATOR_URL) + else: + generator_sha256 = repository_ctx.attr.generator_sha256s.get(host_triple) + generator_url = repository_ctx.attr.generator_urls.get(host_triple) + + if not generator_url: + fail(( + "No generator URL was found either in fro the `CARGO_BAZEL_GENERATOR_URL` " + + "environment variable or for the `{}` triple in the `generator_urls` attribute" + ).format(host_triple)) + + # Download the file into place + if generator_sha256: + repository_ctx.download( + output = output, + url = generator_url, + sha256 = generator_sha256, + executable = True, + ) + return output, None + + result = repository_ctx.download( + output = output, + url = generator_url, + executable = True, + ) + + return output, {host_triple: result.sha256} + +def render_config( + build_file_template = "//:BUILD.{name}-{version}.bazel", + crate_label_template = "@{repository}__{name}-{version}//:{target}", + crate_repository_template = "{repository}__{name}-{version}", + crates_module_template = "//:{file}", + default_package_name = None, + platforms_template = "@rules_rust//rust/platform:{triple}", + vendor_mode = None): + """Various settings used to configure rendered outputs + + The template parameters each support a select number of format keys. A description of each key + can be found below where the supported keys for each template can be found in the parameter docs + + | key | definition | + | --- | --- | + | `name` | The name of the crate. Eg `tokio` | + | `repository` | The rendered repository name for the crate. Directly relates to `crate_repository_template`. | + | `triple` | A platform triple. Eg `x86_64-unknown-linux-gnu` | + | `version` | The crate version. Eg `1.2.3` | + | `target` | The library or binary target of the crate | + | `file` | The basename of a file | + + Args: + build_file_template (str, optional): The base template to use for BUILD file names. The available format keys + are [`{name}`, {version}`]. + crate_label_template (str, optional): The base template to use for crate labels. The available format keys + are [`{repository}`, `{name}`, `{version}`, `{target}`]. + crate_repository_template (str, optional): The base template to use for Crate label repository names. The + available format keys are [`{repository}`, `{name}`, `{version}`]. + crates_module_template (str, optional): The pattern to use for the `defs.bzl` and `BUILD.bazel` + file names used for the crates module. The available format keys are [`{file}`]. + default_package_name (str, optional): The default package name to in the rendered macros. This affects the + auto package detection of things like `all_crate_deps`. + platforms_template (str, optional): The base template to use for platform names. + See [platforms documentation](https://docs.bazel.build/versions/main/platforms.html). The available format + keys are [`{triple}`]. + vendor_mode (str, optional): An optional configuration for rendirng content to be rendered into repositories. + + Returns: + string: A json encoded struct to match the Rust `config::RenderConfig` struct + """ + return json.encode(struct( + build_file_template = build_file_template, + crate_label_template = crate_label_template, + crate_repository_template = crate_repository_template, + crates_module_template = crates_module_template, + default_package_name = default_package_name, + platforms_template = platforms_template, + vendor_mode = vendor_mode, + )) + +def _crate_id(name, version): + """Creates a `cargo_bazel::config::CrateId`. + + Args: + name (str): The name of the crate + version (str): The crate's version + + Returns: + str: A serialized representation of a CrateId + """ + return "{} {}".format(name, version) + +def collect_crate_annotations(annotations, repository_name): + """Deserialize and sanitize crate annotations. + + Args: + annotations (dict): A mapping of crate names to lists of serialized annotations + repository_name (str): The name of the repository that owns the annotations + + Returns: + dict: A mapping of `cargo_bazel::config::CrateId` to sets of annotations + """ + annotations = {name: [json.decode(a) for a in annotation] for name, annotation in annotations.items()} + crate_annotations = {} + for name, annotation in annotations.items(): + for (version, data) in annotation: + if name == "*" and version != "*": + fail( + "Wildcard crate names must have wildcard crate versions. " + + "Please update the `annotations` attribute of the {} crates_repository".format( + repository_name, + ), + ) + id = _crate_id(name, version) + if id in crate_annotations: + fail("Found duplicate entries for {}".format(id)) + + crate_annotations.update({id: data}) + return crate_annotations + +def _read_cargo_config(repository_ctx): + if repository_ctx.attr.cargo_config: + config = repository_ctx.path(repository_ctx.attr.cargo_config) + return repository_ctx.read(config) + return None + +def _get_render_config(repository_ctx): + if repository_ctx.attr.render_config: + config = dict(json.decode(repository_ctx.attr.render_config)) + else: + config = dict(json.decode(render_config())) + + # Add the repository name as it's very relevant to rendering. + config.update({"repository_name": repository_ctx.name}) + + return struct(**config) + +def generate_config(repository_ctx): + """Generate a config file from various attributes passed to the rule. + + Args: + repository_ctx (repository_ctx): The rule's context object. + + Returns: + struct: A struct containing the path to a config and it's contents + """ + annotations = collect_crate_annotations(repository_ctx.attr.annotations, repository_ctx.name) + + # Load additive build files if any have been provided. + content = list() + for data in annotations.values(): + additive_build_file_content = data.pop("additive_build_file_content", None) + if additive_build_file_content: + content.append(additive_build_file_content) + additive_build_file = data.pop("additive_build_file", None) + if additive_build_file: + file_path = repository_ctx.path(Label(additive_build_file)) + content.append(repository_ctx.read(file_path)) + data.update({"additive_build_file_content": "\n".join(content) if content else None}) + + config = struct( + generate_build_scripts = repository_ctx.attr.generate_build_scripts, + annotations = annotations, + cargo_config = _read_cargo_config(repository_ctx), + rendering = _get_render_config(repository_ctx), + supported_platform_triples = repository_ctx.attr.supported_platform_triples, + ) + + config_path = repository_ctx.path("cargo-bazel.json") + repository_ctx.file( + config_path, + json.encode_indent(config, indent = " " * 4), + ) + + # This was originally written to return a struct and not just the config path + # so splicing can have access to some rendering information embedded in the config + # If splicing should no longer need that info, it'd be simpler to just return a `path`. + return struct( + path = config_path, + info = config, + ) + +def get_lockfile(repository_ctx): + """Locate the lockfile and identify the it's type (Cargo or Bazel). + + Args: + repository_ctx (repository_ctx): The rule's context object. + + Returns: + struct: The path to the lockfile as well as it's type + """ + if repository_ctx.attr.lockfile_kind == "auto": + if str(repository_ctx.attr.lockfile).endswith("Cargo.lock"): + kind = "cargo" + else: + kind = "bazel" + else: + kind = repository_ctx.attr.lockfile_kind + + return struct( + path = repository_ctx.path(repository_ctx.attr.lockfile), + kind = kind, + ) + +def determine_repin(repository_ctx, generator, lockfile_path, lockfile_kind, config, splicing_manifest, cargo, rustc): + """Use the `cargo-bazel` binary to determine whether or not dpeendencies need to be re-pinned + + Args: + repository_ctx (repository_ctx): The rule's context object. + generator (path): The path to a `cargo-bazel` binary. + config (path): The path to a `cargo-bazel` config file. See `generate_config`. + splicing_manifest (path): The path to a `cargo-bazel` splicing manifest. See `create_splicing_manifest` + lockfile_path (path): The path to a "lock" file for reproducible outputs. + lockfile_kind (str): The type of lock file represented by `lockfile_path` + cargo (path): The path to a Cargo binary. + rustc (path): The path to a Rustc binary. + + Returns: + bool: True if dependencies need to be re-pinned + """ + + # If a repin environment variable is set, always repin + for var in REPIN_ENV_VARS: + if repository_ctx.os.environ.get(var, "").lower() in ["true", "yes", "1", "on"]: + return True + + # Cargo lockfiles should always be repinned. + if lockfile_kind == "cargo": + return True + + # Run the binary to check if a repin is needed + args = [ + generator, + "query", + "--lockfile", + lockfile_path, + "--config", + config, + "--splicing-manifest", + splicing_manifest, + "--cargo", + cargo, + "--rustc", + rustc, + ] + + env = { + "CARGO": str(cargo), + "RUSTC": str(rustc), + "RUST_BACKTRACE": "full", + } + + # Add any Cargo environment variables to the `cargo-bazel` execution + env.update(cargo_environ(repository_ctx)) + + result = execute( + repository_ctx = repository_ctx, + args = args, + env = env, + ) + + # If it was determined repinning should occur but there was no + # flag indicating repinning was requested, an error is raised + # since repinning should be an explicit action + if result.stdout.strip().lower() == "repin": + # buildifier: disable=print + print(result.stderr) + fail(( + "The current `lockfile` is out of date for '{}'. Please re-run " + + "bazel using `CARGO_BAZEL_REPIN=true` if this is expected " + + "and the lockfile should be updated." + ).format(repository_ctx.name)) + + return False + +def execute_generator( + repository_ctx, + lockfile_path, + lockfile_kind, + generator, + config, + splicing_manifest, + repository_dir, + cargo, + rustc, + repin = False, + metadata = None): + """Execute the `cargo-bazel` binary to produce `BUILD` and `.bzl` files. + + Args: + repository_ctx (repository_ctx): The rule's context object. + lockfile_path (path): The path to a "lock" file (file used for reproducible renderings). + lockfile_kind (str): The type of lockfile given (Cargo or Bazel). + generator (path): The path to a `cargo-bazel` binary. + config (path): The path to a `cargo-bazel` config file. + splicing_manifest (path): The path to a `cargo-bazel` splicing manifest. See `create_splicing_manifest` + repository_dir (path): The output path for the Bazel module and BUILD files. + cargo (path): The path of a Cargo binary. + rustc (path): The path of a Rustc binary. + repin (bool, optional): Whether or not to repin dependencies + metadata (path, optional): The path to a Cargo metadata json file. + + Returns: + struct: The results of `repository_ctx.execute`. + """ + repository_ctx.report_progress("Generating crate BUILD files.") + + args = [ + generator, + "generate", + "--lockfile", + lockfile_path, + "--lockfile-kind", + lockfile_kind, + "--config", + config, + "--splicing-manifest", + splicing_manifest, + "--repository-dir", + repository_dir, + "--cargo", + cargo, + "--rustc", + rustc, + ] + + env = { + "RUST_BACKTRACE": "full", + } + + # Some components are not required unless re-pinning is enabled + if repin: + args.extend([ + "--repin", + "--metadata", + metadata, + ]) + env.update({ + "CARGO": str(cargo), + "RUSTC": str(rustc), + }) + + # Add any Cargo environment variables to the `cargo-bazel` execution + env.update(cargo_environ(repository_ctx)) + + result = execute( + repository_ctx = repository_ctx, + args = args, + env = env, + ) + + return result diff --git a/crate_universe/private/selects.bzl b/crate_universe/private/selects.bzl new file mode 100644 index 0000000000..bcbad19afb --- /dev/null +++ b/crate_universe/private/selects.bzl @@ -0,0 +1,56 @@ +"""A helper module solving for complex select statements in rendered cargo-bazel modules""" + +def select_with_or(input_dict, no_match_error = ""): + """Drop-in replacement for `select()` that supports ORed keys. + + This is notably different from [@bazel_skylib//lib:selects.bzl%selects.with_or][swo] in that + the input dict must have a list as it's values and they keys will continue to expand for each + entry instead of failing on duplicates. + + Example: + ```starlark + deps = selects.with_or({ + "//configs:one": [":dep1"], + ("//configs:two", "//configs:three"): [":dep2or3"], + "//configs:four": [":dep4"], + "//conditions:default": [":default"] + }) + ``` + Key labels may appear at most once anywhere in the input. + + This macro eturns a native `select` that expands `("//configs:two", "//configs:three"): [":dep2or3"]` to + ```starlark + "//configs:two": [":dep2or3"], + "//configs:three": [":dep2or3"], + ``` + + [swo]: https://github.com/bazelbuild/bazel-skylib/blob/1.1.1/docs/selects_doc.md#selectswith_or + + Args: + input_dict: The same dictionary `select()` takes, except keys may take + either the usual form `"//foo:config1"` or + `("//foo:config1", "//foo:config2", ...)` to signify + `//foo:config1` OR `//foo:config2` OR `...`. + no_match_error: Optional custom error to report if no condition matches. + + Returns: + A native `select()` + """ + output_dict = {} + for (key, value) in input_dict.items(): + if type(key) == type(()): + for config_setting in key: + if config_setting in output_dict: + output_dict[config_setting].extend(value) + else: + output_dict[config_setting] = list(value) + elif key in output_dict: + output_dict[key].extend(value) + else: + output_dict[key] = list(value) + + # return a dict with deduped lists + return select( + {key: depset(value).to_list() for key, value in output_dict.items()}, + no_match_error = no_match_error, + ) diff --git a/crate_universe/private/splicing_utils.bzl b/crate_universe/private/splicing_utils.bzl new file mode 100644 index 0000000000..5a57e3a652 --- /dev/null +++ b/crate_universe/private/splicing_utils.bzl @@ -0,0 +1,208 @@ +"""Utilities directly related to the `splicing` step of `cargo-bazel`.""" + +load(":common_utils.bzl", "cargo_environ", "execute") + +def splicing_config(resolver_version = "1"): + """arious settings used to configure Cargo manifest splicing behavior. + + [rv]: https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions + + Args: + resolver_version (str, optional): The [resolver version][rv] to use in generated Cargo + manifests. This flag is **only** used when splicing a manifest from direct package + definitions. See `crates_repository::packages`. + + Returns: + str: A json encoded string of the parameters provided + """ + return json.encode(struct( + resolver_version = resolver_version, + )) + +def download_extra_workspace_members(repository_ctx, cache_dir, render_template_registry_url): + """Download additional workspace members for use in splicing. + + Args: + repository_ctx (repository_ctx): The rule's context object. + cache_dir (path): A directory in which to download and extract extra workspace members + render_template_registry_url (str): The base template to use for determining the crate's registry URL. + + Returns: + list: A list of information related to the downloaded crates + - manifest: The path of the manifest. + - url: The url the manifest came from. + - sha256: The sha256 checksum of the new manifest. + """ + manifests = [] + extra_workspace_members = repository_ctx.attr.extra_workspace_members + if extra_workspace_members: + repository_ctx.report_progress("Downloading extra workspace members.") + + for name, spec in repository_ctx.attr.extra_workspace_members.items(): + spec = struct(**json.decode(spec)) + + url = render_template_registry_url + url = url.replace("{name}", name) + url = url.replace("{version}", spec.version) + + if spec.sha256: + result = repository_ctx.download_and_extract( + output = cache_dir, + url = url, + sha256 = spec.sha256, + type = "tar.gz", + ) + else: + result = repository_ctx.download_and_extract( + output = cache_dir, + url = url, + type = "tar.gz", + ) + + manifest = repository_ctx.path("{}/{}-{}/Cargo.toml".format( + cache_dir, + name, + spec.version, + )) + + if not manifest.exists: + fail("Extra workspace member '{}' has no root Cargo.toml file".format(name)) + + manifests.append(struct( + manifest = str(manifest), + url = url, + sha256 = result.sha256, + )) + + return manifests + +def create_splicing_manifest(repository_ctx): + """Produce a manifest containing required components for splciing a new Cargo workspace + + Args: + repository_ctx (repository_ctx): The rule's context object. + + Returns: + path: The path to a json encoded manifest + """ + repo_dir = repository_ctx.path(".") + + # Deserialize information about direct packges + direct_packages_info = { + pkg: json.decode(data) + for (pkg, data) in repository_ctx.attr.packages.items() + } + + manifests = {str(repository_ctx.path(m)): str(m) for m in repository_ctx.attr.manifests} + + if repository_ctx.attr.cargo_config: + cargo_config = str(repository_ctx.path(repository_ctx.attr.cargo_config)) + else: + cargo_config = None + + # Load user configurable splicing settings + config = json.decode(repository_ctx.attr.splicing_config or splicing_config()) + + # Auto-generated splicier manifest values + splicing_manifest_content = { + "cargo_config": cargo_config, + "direct_packages": direct_packages_info, + "manifests": manifests, + } + + # Serialize information required for splicing + splicing_manifest = repository_ctx.path("{}/splicing_manifest.json".format(repo_dir)) + repository_ctx.file( + splicing_manifest, + json.encode_indent( + dict(dict(config).items() + splicing_manifest_content.items()), + indent = " " * 4, + ), + ) + + return splicing_manifest + +def splice_workspace_manifest(repository_ctx, generator, lockfile, splicing_manifest, cargo, rustc): + """Splice together a Cargo workspace from various other manifests and package definitions + + Args: + repository_ctx (repository_ctx): The rule's context object. + generator (path): The `cargo-bazel` binary. + lockfile (path): The path to a "lock" file for reproducible `cargo-bazel` renderings. + splicing_manifest (path): The path to a splicing manifest. + cargo (path): The path to a Cargo binary. + rustc (path): The Path to a Rustc binary. + + Returns: + path: The path to a Cargo metadata json file found in the spliced workspace root. + """ + repository_ctx.report_progress("Splicing Cargo workspace.") + repo_dir = repository_ctx.path(".") + + # Download extra workspace members + crates_cache_dir = repository_ctx.path("{}/.crates_cache".format(repo_dir)) + extra_manifest_info = download_extra_workspace_members( + repository_ctx = repository_ctx, + cache_dir = crates_cache_dir, + render_template_registry_url = repository_ctx.attr.extra_workspace_member_url_template, + ) + + extra_manifests_manifest = repository_ctx.path("{}/extra_manifests_manifest.json".format(repo_dir)) + repository_ctx.file( + extra_manifests_manifest, + json.encode_indent(struct( + manifests = extra_manifest_info, + ), indent = " " * 4), + ) + + cargo_workspace = repository_ctx.path("{}/cargo-bazel-splicing".format(repo_dir)) + + # Generate a workspace root which contains all workspace members + arguments = [ + generator, + "splice", + "--workspace-dir", + cargo_workspace, + "--splicing-manifest", + splicing_manifest, + "--extra-manifests-manifest", + extra_manifests_manifest, + "--cargo", + cargo, + "--rustc", + rustc, + ] + + # Splicing accepts a Cargo.lock file in some scenarios. Ensure it's passed + # if the lockfile is a actually a Cargo lockfile. + if lockfile.kind == "cargo": + arguments.extend([ + "--cargo-lockfile", + lockfile.path, + ]) + + env = { + "CARGO": str(cargo), + "RUSTC": str(rustc), + "RUST_BACKTRACE": "full", + } + + # Add any Cargo environment variables to the `cargo-bazel` execution + env.update(cargo_environ(repository_ctx)) + + execute( + repository_ctx = repository_ctx, + args = arguments, + env = env, + ) + + root_manifest = repository_ctx.path("{}/Cargo.toml".format(cargo_workspace)) + if not root_manifest.exists: + fail("Root manifest does not exist: {}".format(root_manifest)) + + # This file must match the one generated in splicing + metadata_path = repository_ctx.path("{}/cargo-bazel-spliced-metadata.json".format(cargo_workspace)) + if not metadata_path.exists: + fail("Root metadata file does not exist: {}".format(metadata_path)) + + return metadata_path diff --git a/crate_universe/private/srcs.bzl b/crate_universe/private/srcs.bzl new file mode 100644 index 0000000000..acdfa614cf --- /dev/null +++ b/crate_universe/private/srcs.bzl @@ -0,0 +1,51 @@ +"""A generate file containing all source files used to produce `cargo-bazel`""" + +# Each source file is tracked as a target so the `cargo_bootstrap_repository` +# rule will know to automatically rebuild if any of the sources changed. +CARGO_BAZEL_SRCS = [ + "@rules_rust//crate_universe:src/cli.rs", + "@rules_rust//crate_universe:src/cli/generate.rs", + "@rules_rust//crate_universe:src/cli/query.rs", + "@rules_rust//crate_universe:src/cli/splice.rs", + "@rules_rust//crate_universe:src/cli/vendor.rs", + "@rules_rust//crate_universe:src/config.rs", + "@rules_rust//crate_universe:src/context.rs", + "@rules_rust//crate_universe:src/context/crate_context.rs", + "@rules_rust//crate_universe:src/context/platforms.rs", + "@rules_rust//crate_universe:src/lib.rs", + "@rules_rust//crate_universe:src/lockfile.rs", + "@rules_rust//crate_universe:src/main.rs", + "@rules_rust//crate_universe:src/metadata.rs", + "@rules_rust//crate_universe:src/metadata/dependency.rs", + "@rules_rust//crate_universe:src/metadata/metadata_annotation.rs", + "@rules_rust//crate_universe:src/rendering.rs", + "@rules_rust//crate_universe:src/rendering/template_engine.rs", + "@rules_rust//crate_universe:src/rendering/templates/crate_build_file.j2", + "@rules_rust//crate_universe:src/rendering/templates/module_build_file.j2", + "@rules_rust//crate_universe:src/rendering/templates/module_bzl.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/aliases.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/binary.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/build_script.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/common_attrs.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/deps.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/library.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/crate/proc_macro.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/header.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/module/aliases_map.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/module/deps_map.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/module/repo_git.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/module/repo_http.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/starlark/glob.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/starlark/selectable_dict.j2", + "@rules_rust//crate_universe:src/rendering/templates/partials/starlark/selectable_list.j2", + "@rules_rust//crate_universe:src/rendering/templates/vendor_module.j2", + "@rules_rust//crate_universe:src/splicing.rs", + "@rules_rust//crate_universe:src/splicing/cargo_config.rs", + "@rules_rust//crate_universe:src/splicing/splicer.rs", + "@rules_rust//crate_universe:src/test.rs", + "@rules_rust//crate_universe:src/utils.rs", + "@rules_rust//crate_universe:src/utils/starlark.rs", + "@rules_rust//crate_universe:src/utils/starlark/glob.rs", + "@rules_rust//crate_universe:src/utils/starlark/label.rs", + "@rules_rust//crate_universe:src/utils/starlark/select.rs", +] diff --git a/crate_universe/private/test/BUILD.bazel b/crate_universe/private/test/BUILD.bazel new file mode 100644 index 0000000000..c138c17a1d --- /dev/null +++ b/crate_universe/private/test/BUILD.bazel @@ -0,0 +1,15 @@ +load("@bazel_skylib//rules:diff_test.bzl", "diff_test") + +diff_test( + name = "srcs_diff_test", + failure_message = "Please run 'bazel run //crate_universe/private:srcs_module.install'", + file1 = "//crate_universe/private:srcs_module", + file2 = "//crate_universe/private:srcs.bzl", + # TODO: The diff_test here fails on Windows. As does the + # install script. This should be fixed. + target_compatible_with = select({ + "@platforms//os:linux": [], + "@platforms//os:macos": [], + "//conditions:default": ["@platforms//:incompatible"], + }), +) diff --git a/crate_universe/private/urls.bzl b/crate_universe/private/urls.bzl new file mode 100644 index 0000000000..e4d615cb44 --- /dev/null +++ b/crate_universe/private/urls.bzl @@ -0,0 +1,25 @@ +"""A file containing urls and associated sha256 values for cargo-bazel binaries + +This file is auto-generated for each release to match the urls and sha256s of +the binaries produced for it. +""" + +# Example: +# { +# "x86_64-unknown-linux-gnu": "https://domain.com/downloads/cargo-bazel-x86_64-unknown-linux-gnu", +# "x86_64-apple-darwin": "https://domain.com/downloads/cargo-bazel-x86_64-apple-darwin", +# "x86_64-pc-windows-msvc": "https://domain.com/downloads/cargo-bazel-x86_64-pc-windows-msvc", +# } +CARGO_BAZEL_URLS = {} + +# Example: +# { +# "x86_64-unknown-linux-gnu": "1d687fcc860dc8a1aa6198e531f0aee0637ed506d6a412fe2b9884ff5b2b17c0", +# "x86_64-apple-darwin": "0363e450125002f581d29cf632cc876225d738cfa433afa85ca557afb671eafa", +# "x86_64-pc-windows-msvc": "f5647261d989f63dafb2c3cb8e131b225338a790386c06cf7112e43dd9805882", +# } +CARGO_BAZEL_SHA256S = {} + +# Example: +# Label("//crate_universe:cargo_bazel_bin") +CARGO_BAZEL_LABEL = Label("@cargo_bazel_bootstrap//:binary") diff --git a/crate_universe/private/util.bzl b/crate_universe/private/util.bzl deleted file mode 100644 index a28d1e83d4..0000000000 --- a/crate_universe/private/util.bzl +++ /dev/null @@ -1,152 +0,0 @@ -"""Utility functions for the crate_universe resolver""" - -load( - "//rust/platform:triple_mappings.bzl", - "system_to_binary_ext", - "triple_to_arch", - "triple_to_system", -) - -_CPU_ARCH_ERROR_MSG = """\ -Command failed with exit code '{code}': {args} -----------stdout: -{stdout} -----------stderr: -{stderr} -""" - -def _query_cpu_architecture(repository_ctx, expected_archs, is_windows = False): - """Detect the host CPU architecture - - Args: - repository_ctx (repository_ctx): The repository rule's context object - expected_archs (list): A list of expected architecture strings - is_windows (bool, optional): If true, the cpu lookup will use the windows method (`wmic` vs `uname`) - - Returns: - str: The host's CPU architecture - """ - if is_windows: - arguments = ["wmic", "os", "get", "osarchitecture"] - else: - arguments = ["uname", "-m"] - - result = repository_ctx.execute(arguments) - - if result.return_code: - fail(_CPU_ARCH_ERROR_MSG.format( - code = result.return_code, - args = arguments, - stdout = result.stdout, - stderr = result.stderr, - )) - - if is_windows: - # Example output: - # OSArchitecture - # 64-bit - lines = result.stdout.split("\n") - arch = lines[1].strip() - - # Translate 64-bit to a compatible rust platform - # https://doc.rust-lang.org/nightly/rustc/platform-support.html - if arch == "64-bit": - arch = "x86_64" - else: - arch = result.stdout.strip("\n") - - # Correct the arm architecture for macos - if "mac" in repository_ctx.os.name and arch == "arm64": - arch = "aarch64" - - if not arch in expected_archs: - fail("{} is not a expected cpu architecture {}\n{}".format( - arch, - expected_archs, - result.stdout, - )) - - return arch - -def get_host_triple(repository_ctx): - """Query host information for the appropriate triples for the crate_universe resolver - - Args: - repository_ctx (repository_ctx): The rule's repository_ctx - - Returns: - tuple: The host triple and resolver triple - """ - - # Detect the host's cpu architecture - - supported_architectures = { - "linux": ["aarch64", "x86_64"], - "macos": ["aarch64", "x86_64"], - "windows": ["x86_64"], - } - - if "linux" in repository_ctx.os.name: - cpu = _query_cpu_architecture(repository_ctx, supported_architectures["linux"]) - host_triple = "{}-unknown-linux-gnu".format(cpu) - resolver_triple = "{}-unknown-linux-gnu".format(cpu) - elif "mac" in repository_ctx.os.name: - cpu = _query_cpu_architecture(repository_ctx, supported_architectures["macos"]) - host_triple = "{}-apple-darwin".format(cpu) - resolver_triple = "{}-apple-darwin".format(cpu) - elif "win" in repository_ctx.os.name: - cpu = _query_cpu_architecture(repository_ctx, supported_architectures["windows"], True) - - # TODO: The resolver triple should be the same as the host but for the time being, - # the resolver is compiled with `-gnu` not `-msvc`. - host_triple = "{}-pc-windows-msvc".format(cpu) - resolver_triple = "{}-pc-windows-gnu".format(cpu) - else: - fail("Could not locate resolver for OS " + repository_ctx.os.name) - - return (host_triple, resolver_triple) - -def get_cargo_and_rustc(repository_ctx, host_triple): - """Retrieve a cargo and rustc binary based on the host triple. - - Args: - repository_ctx (repository_ctx): The rule's context object - host_triple (str): The host's platform triple - - Returns: - struct: A struct containing the expected tools - """ - - if repository_ctx.attr.version in ("beta", "nightly"): - version_str = "{}-{}".format(repository_ctx.attr.version, repository_ctx.attr.iso_date) - else: - version_str = repository_ctx.attr.version - - # Get info about the current host's tool locations - host_triple, _ = get_host_triple(repository_ctx) - system = triple_to_system(host_triple) - extension = system_to_binary_ext(system) - arch = triple_to_arch(host_triple) - - rust_toolchain_repository = repository_ctx.attr.rust_toolchain_repository_template - rust_toolchain_repository = rust_toolchain_repository.replace("{version}", version_str) - rust_toolchain_repository = rust_toolchain_repository.replace("{system}", system) - rust_toolchain_repository = rust_toolchain_repository.replace("{triple}", host_triple) - rust_toolchain_repository = rust_toolchain_repository.replace("{arch}", arch) - - tool_path = repository_ctx.attr.rust_toolchain_repository_tool_path - cargo_path = repository_ctx.path(Label("@{}//{}{}".format( - rust_toolchain_repository, - tool_path["cargo"], - extension, - ))) - rustc_path = repository_ctx.path(Label("@{}//{}{}".format( - rust_toolchain_repository, - tool_path["rustc"], - extension, - ))) - - return struct( - cargo = cargo_path, - rustc = rustc_path, - ) diff --git a/crate_universe/private/vendor/BUILD.bazel b/crate_universe/private/vendor/BUILD.bazel new file mode 100644 index 0000000000..3c023872d2 --- /dev/null +++ b/crate_universe/private/vendor/BUILD.bazel @@ -0,0 +1,11 @@ +load("//crate_universe/private:vendor_utils.bzl", "crates_vendor_deps_targets") + +crates_vendor_deps_targets() + +filegroup( + name = "distro", + srcs = glob(["*.bzl"]) + [ + "BUILD.bazel", + ], + visibility = ["//crate_universe/private:__subpackages__"], +) diff --git a/crate_universe/private/vendor_utils.bzl b/crate_universe/private/vendor_utils.bzl new file mode 100644 index 0000000000..a866edd097 --- /dev/null +++ b/crate_universe/private/vendor_utils.bzl @@ -0,0 +1,74 @@ +"""Utility functions for use with the `crates_vendor` rule""" + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +_BUILDIFIER_VERSION = "5.0.1" +_BUILDIFIER_URL_TEMPLATE = "https://github.com/bazelbuild/buildtools/releases/download/{version}/{bin}" +_BUILDIFIER_SHA256S = { + "buildifier-darwin-amd64": "2cb0a54683633ef6de4e0491072e22e66ac9c6389051432b76200deeeeaf93fb", + "buildifier-darwin-arm64": "4da23315f0dccabf878c8227fddbccf35545b23b3cb6225bfcf3107689cc4364", + "buildifier-linux-amd64": "3ed7358c7c6a1ca216dc566e9054fd0b97a1482cb0b7e61092be887d42615c5d", + "buildifier-linux-arm64": "c657c628fca72b7e0446f1a542231722a10ba4321597bd6f6249a5da6060b6ff", + "buildifier-windows-amd64.exe": "45e13b2951e4c611d346dacdaf0aafaa484045a3e7300fbc5dd01a896a688177", +} + +def crates_vendor_deps(): + for bin, sha256 in _BUILDIFIER_SHA256S.items(): + maybe( + http_file, + name = "cargo_bazel.{}".format(bin), + urls = [_BUILDIFIER_URL_TEMPLATE.format( + bin = bin, + version = _BUILDIFIER_VERSION, + )], + sha256 = sha256, + downloaded_file_path = "buildifier.exe", + executable = True, + ) + +# buildifier: disable=unnamed-macro +def crates_vendor_deps_targets(): + """Define dependencies of the `crates_vendor` rule""" + + native.config_setting( + name = "linux_amd64", + constraint_values = ["@platforms//os:linux", "@platforms//cpu:x86_64"], + visibility = ["//visibility:public"], + ) + + native.config_setting( + name = "linux_arm64", + constraint_values = ["@platforms//os:linux", "@platforms//cpu:arm64"], + visibility = ["//visibility:public"], + ) + + native.config_setting( + name = "macos_amd64", + constraint_values = ["@platforms//os:macos", "@platforms//cpu:x86_64"], + visibility = ["//visibility:public"], + ) + + native.config_setting( + name = "macos_arm64", + constraint_values = ["@platforms//os:macos", "@platforms//cpu:arm64"], + visibility = ["//visibility:public"], + ) + + native.config_setting( + name = "windows", + constraint_values = ["@platforms//os:windows"], + visibility = ["//visibility:public"], + ) + + native.alias( + name = "buildifier", + actual = select({ + ":linux_amd64": "@cargo_bazel.buildifier-linux-amd64//file", + ":linux_arm64": "@cargo_bazel.buildifier-linux-arm64//file", + ":macos_amd64": "@cargo_bazel.buildifier-darwin-amd64//file", + ":macos_arm64": "@cargo_bazel.buildifier-darwin-arm64//file", + ":windows": "@cargo_bazel.buildifier-windows-amd64.exe//file", + }), + visibility = ["//visibility:public"], + ) diff --git a/crate_universe/src/cli.rs b/crate_universe/src/cli.rs new file mode 100644 index 0000000000..2ed27accd9 --- /dev/null +++ b/crate_universe/src/cli.rs @@ -0,0 +1,42 @@ +//! Command line interface entry points and utilities + +mod generate; +mod query; +mod splice; +mod vendor; + +use clap::Parser; + +use self::generate::GenerateOptions; +use self::query::QueryOptions; +use self::splice::SpliceOptions; +use self::vendor::VendorOptions; + +// Entrypoints +pub use generate::generate; +pub use query::query; +pub use splice::splice; +pub use vendor::vendor; + +#[derive(Parser, Debug)] +#[clap(name = "cargo-bazel", about, version)] +pub enum Options { + /// Generate Bazel Build files from a Cargo manifest. + Generate(GenerateOptions), + + /// Splice together disjoint Cargo and Bazel info into a single Cargo workspace manifest. + Splice(SpliceOptions), + + /// Query workspace info to determine whether or not a repin is needed. + Query(QueryOptions), + + /// Vendor BUILD files to the workspace with either repository definitions or `cargo vendor` generated sources. + Vendor(VendorOptions), +} + +// Convenience wrappers to avoid dependencies in the binary +pub type Result = anyhow::Result; + +pub fn parse_args() -> Options { + Options::parse() +} diff --git a/crate_universe/src/cli/generate.rs b/crate_universe/src/cli/generate.rs new file mode 100644 index 0000000000..67ae868607 --- /dev/null +++ b/crate_universe/src/cli/generate.rs @@ -0,0 +1,142 @@ +//! The cli entrypoint for the `generate` subcommand + +use std::path::PathBuf; + +use anyhow::{bail, Result}; +use clap::Parser; + +use crate::config::Config; +use crate::context::Context; +use crate::lockfile::{is_cargo_lockfile, lock_context, write_lockfile, LockfileKind}; +use crate::metadata::load_metadata; +use crate::metadata::Annotations; +use crate::rendering::{write_outputs, Renderer}; +use crate::splicing::SplicingManifest; + +/// Command line options for the `generate` subcommand +#[derive(Parser, Debug)] +#[clap(about, version)] +pub struct GenerateOptions { + /// The path to a Cargo binary to use for gathering metadata + #[clap(long, env = "CARGO")] + pub cargo: Option, + + /// The path to a rustc binary for use with Cargo + #[clap(long, env = "RUSTC")] + pub rustc: Option, + + /// The config file with information about the Bazel and Cargo workspace + #[clap(long)] + pub config: PathBuf, + + /// A generated manifest of splicing inputs + #[clap(long)] + pub splicing_manifest: PathBuf, + + /// The path to either a Cargo or Bazel lockfile + #[clap(long)] + pub lockfile: PathBuf, + + /// The type of lockfile + #[clap(long)] + pub lockfile_kind: LockfileKind, + + /// The directory of the current repository rule + #[clap(long)] + pub repository_dir: PathBuf, + + /// A [Cargo config](https://doc.rust-lang.org/cargo/reference/config.html#configuration) + /// file to use when gathering metadata + #[clap(long)] + pub cargo_config: Option, + + /// Whether or not to ignore the provided lockfile and re-generate one + #[clap(long)] + pub repin: bool, + + /// The path to a Cargo metadata `json` file. + #[clap(long)] + pub metadata: Option, + + /// If true, outputs will be printed instead of written to disk. + #[clap(long)] + pub dry_run: bool, +} + +pub fn generate(opt: GenerateOptions) -> Result<()> { + // Load the config + let config = Config::try_from_path(&opt.config)?; + + // Determine if the dependencies need to be repinned. + let mut should_repin = opt.repin; + + // Cargo lockfiles must always be repinned. + if is_cargo_lockfile(&opt.lockfile, &opt.lockfile_kind) { + should_repin = true; + } + + // Go straight to rendering if there is no need to repin + if !should_repin { + let context = Context::try_from_path(opt.lockfile)?; + + // Render build files + let outputs = Renderer::new(config.rendering).render(&context)?; + + // Write the outputs to disk + write_outputs(outputs, &opt.repository_dir, opt.dry_run)?; + + return Ok(()); + } + + // Ensure Cargo and Rustc are available for use during generation. + let cargo_bin = match &opt.cargo { + Some(bin) => bin, + None => bail!("The `--cargo` argument is required when generating unpinned content"), + }; + let rustc_bin = match &opt.rustc { + Some(bin) => bin, + None => bail!("The `--rustc` argument is required when generating unpinned content"), + }; + + // Ensure a path to a metadata file was provided + let metadata_path = match &opt.metadata { + Some(path) => path, + None => bail!("The `--metadata` argument is required when generating unpinned content"), + }; + + // Load Metadata and Lockfile + let (cargo_metadata, cargo_lockfile) = load_metadata( + metadata_path, + if is_cargo_lockfile(&opt.lockfile, &opt.lockfile_kind) { + Some(&opt.lockfile) + } else { + None + }, + )?; + + // Copy the rendering config for later use + let render_config = config.rendering.clone(); + + // Annotate metadata + let annotations = Annotations::new(cargo_metadata, cargo_lockfile, config.clone())?; + + // Generate renderable contexts for earch package + let context = Context::new(annotations)?; + + // Render build files + let outputs = Renderer::new(render_config).render(&context)?; + + // Write outputs + write_outputs(outputs, &opt.repository_dir, opt.dry_run)?; + + // Ensure Bazel lockfiles are written to disk so future generations can be short-circuted. + if matches!(opt.lockfile_kind, LockfileKind::Bazel) { + let splicing_manifest = SplicingManifest::try_from_path(&opt.splicing_manifest)?; + + let lockfile = lock_context(context, &config, &splicing_manifest, cargo_bin, rustc_bin)?; + + write_lockfile(lockfile, &opt.lockfile, opt.dry_run)?; + } + + Ok(()) +} diff --git a/crate_universe/src/cli/query.rs b/crate_universe/src/cli/query.rs new file mode 100644 index 0000000000..668f64fc80 --- /dev/null +++ b/crate_universe/src/cli/query.rs @@ -0,0 +1,87 @@ +//! The cli entrypoint for the `query` subcommand + +use std::fs; +use std::path::PathBuf; + +use anyhow::Result; +use clap::Parser; + +use crate::config::Config; +use crate::context::Context; +use crate::lockfile::Digest; +use crate::splicing::SplicingManifest; + +/// Command line options for the `query` subcommand +#[derive(Parser, Debug)] +#[clap(about, version)] +pub struct QueryOptions { + /// The lockfile path for reproducible Cargo->Bazel renderings + #[clap(long)] + pub lockfile: PathBuf, + + /// The config file with information about the Bazel and Cargo workspace + #[clap(long)] + pub config: PathBuf, + + /// A generated manifest of splicing inputs + #[clap(long)] + pub splicing_manifest: PathBuf, + + /// The path to a Cargo binary to use for gathering metadata + #[clap(long, env = "CARGO")] + pub cargo: PathBuf, + + /// The path to a rustc binary for use with Cargo + #[clap(long, env = "RUSTC")] + pub rustc: PathBuf, +} + +/// Determine if the current lockfile needs to be re-pinned +pub fn query(opt: QueryOptions) -> Result<()> { + // Read the lockfile + let content = match fs::read_to_string(&opt.lockfile) { + Ok(c) => c, + Err(_) => return announce_repin("Unable to read lockfile"), + }; + + // Deserialize it so we can easily compare it with + let lockfile: Context = match serde_json::from_str(&content) { + Ok(ctx) => ctx, + Err(_) => return announce_repin("Could not load lockfile"), + }; + + // Check to see if a digest has been set + let digest = match &lockfile.checksum { + Some(d) => d.clone(), + None => return announce_repin("No digest provided in lockfile"), + }; + + // Load the config file + let config = Config::try_from_path(&opt.config)?; + + let splicing_manifest = SplicingManifest::try_from_path(&opt.splicing_manifest)?; + + // Generate a new digest so we can compare it with the one in the lockfile + let expected = Digest::new( + &lockfile, + &config, + &splicing_manifest, + &opt.cargo, + &opt.rustc, + )?; + if digest != expected { + return announce_repin(&format!( + "Digests do not match: {:?} != {:?}", + digest, expected + )); + } + + // There is no need to repin + Ok(()) +} + +fn announce_repin(reason: &str) -> Result<()> { + eprintln!("{}", reason); + println!("repin"); + Ok(()) +} diff --git a/crate_universe/src/cli/splice.rs b/crate_universe/src/cli/splice.rs new file mode 100644 index 0000000000..cb8ba20492 --- /dev/null +++ b/crate_universe/src/cli/splice.rs @@ -0,0 +1,90 @@ +//! The cli entrypoint for the `splice` subcommand + +use std::path::PathBuf; + +use clap::Parser; + +use crate::cli::Result; +use crate::metadata::{write_metadata, Generator, MetadataGenerator}; +use crate::splicing::{ + generate_lockfile, ExtraManifestsManifest, Splicer, SplicingManifest, WorkspaceMetadata, +}; + +/// Command line options for the `splice` subcommand +#[derive(Parser, Debug)] +#[clap(about, version)] +pub struct SpliceOptions { + /// A generated manifest of splicing inputs + #[clap(long)] + pub splicing_manifest: PathBuf, + + /// A generated manifest of "extra workspace members" + #[clap(long)] + pub extra_manifests_manifest: PathBuf, + + /// A Cargo lockfile (Cargo.lock). + #[clap(long)] + pub cargo_lockfile: Option, + + /// The directory in which to build the workspace. A `Cargo.toml` file + /// should always be produced within this directory. + #[clap(long)] + pub workspace_dir: PathBuf, + + /// If true, outputs will be printed instead of written to disk. + #[clap(long)] + pub dry_run: bool, + + /// The path to a Cargo configuration file. + #[clap(long)] + pub cargo_config: Option, + + /// The path to a Cargo binary to use for gathering metadata + #[clap(long, env = "CARGO")] + pub cargo: PathBuf, + + /// The path to a rustc binary for use with Cargo + #[clap(long, env = "RUSTC")] + pub rustc: PathBuf, +} + +/// Combine a set of disjoint manifests into a single workspace. +pub fn splice(opt: SpliceOptions) -> Result<()> { + // Load the all config files required for splicing a workspace + let splicing_manifest = SplicingManifest::try_from_path(&opt.splicing_manifest)?; + let extra_manifests_manifest = + ExtraManifestsManifest::try_from_path(opt.extra_manifests_manifest)?; + + // Generate a splicer for creating a Cargo workspace manifest + let splicer = Splicer::new( + opt.workspace_dir, + splicing_manifest, + extra_manifests_manifest, + )?; + + // Splice together the manifest + let manifest_path = splicer.splice_workspace()?; + + // Generate a lockfile + let cargo_lockfile = + generate_lockfile(&manifest_path, &opt.cargo_lockfile, &opt.cargo, &opt.rustc)?; + + // Write the registry url info to the manifest now that a lockfile has been generated + WorkspaceMetadata::write_registry_urls(&cargo_lockfile, &manifest_path)?; + + // Write metadata to the workspace for future reuse + let (cargo_metadata, _) = Generator::new() + .with_cargo(opt.cargo) + .with_rustc(opt.rustc) + .generate(&manifest_path.as_path_buf())?; + + // Write metadata next to the manifest + let metadata_path = manifest_path + .as_path_buf() + .parent() + .expect("Newly spliced cargo manifest has no parent directory") + .join("cargo-bazel-spliced-metadata.json"); + write_metadata(&metadata_path, &cargo_metadata)?; + + Ok(()) +} diff --git a/crate_universe/src/cli/vendor.rs b/crate_universe/src/cli/vendor.rs new file mode 100644 index 0000000000..68e107fc8d --- /dev/null +++ b/crate_universe/src/cli/vendor.rs @@ -0,0 +1,167 @@ +//! The cli entrypoint for the `vendor` subcommand + +use std::collections::BTreeSet; +use std::fs; +use std::path::{Path, PathBuf}; +use std::process::{self, ExitStatus}; + +use anyhow::{bail, Context as AnyhowContext, Result}; +use clap::Parser; + +use crate::config::{Config, VendorMode}; +use crate::context::Context; +use crate::metadata::{Annotations, VendorGenerator}; +use crate::metadata::{Generator, MetadataGenerator}; +use crate::rendering::{render_module_label, write_outputs, Renderer}; +use crate::splicing::{ + generate_lockfile, ExtraManifestsManifest, Splicer, SplicingManifest, WorkspaceMetadata, +}; + +/// Command line options for the `vendor` subcommand +#[derive(Parser, Debug)] +#[clap(about, version)] +pub struct VendorOptions { + /// The path to a Cargo binary to use for gathering metadata + #[clap(long, env = "CARGO")] + pub cargo: PathBuf, + + /// The path to a rustc binary for use with Cargo + #[clap(long, env = "RUSTC")] + pub rustc: PathBuf, + + /// The path to a buildifier binary for formatting generated BUILD files + #[clap(long)] + pub buildifier: Option, + + /// The config file with information about the Bazel and Cargo workspace + #[clap(long)] + pub config: PathBuf, + + /// A generated manifest of splicing inputs + #[clap(long)] + pub splicing_manifest: PathBuf, + + /// The path to a Cargo lockfile + #[clap(long)] + pub cargo_lockfile: Option, + + /// A [Cargo config](https://doc.rust-lang.org/cargo/reference/config.html#configuration) + /// file to use when gathering metadata + #[clap(long)] + pub cargo_config: Option, + + /// The path to a Cargo metadata `json` file. + #[clap(long)] + pub metadata: Option, + + /// A generated manifest of "extra workspace members" + #[clap(long)] + pub extra_manifests_manifest: PathBuf, + + /// The directory in which to build the workspace. A `Cargo.toml` file + /// should always be produced within this directory. + #[clap(long, env = "BUILD_WORKSPACE_DIRECTORY")] + pub workspace_dir: PathBuf, + + /// If true, outputs will be printed instead of written to disk. + #[clap(long)] + pub dry_run: bool, +} + +/// Run buildifier on a given file. +fn buildifier_format(bin: &Path, file: &Path) -> Result { + let status = process::Command::new(bin) + .args(["-lint=fix", "-mode=fix", "-warnings=all"]) + .arg(file) + .status() + .context("Failed to apply buildifier fixes")?; + + if !status.success() { + bail!(status) + } + + Ok(status) +} + +pub fn vendor(opt: VendorOptions) -> Result<()> { + // Load the all config files required for splicing a workspace + let splicing_manifest = + SplicingManifest::try_from_path(&opt.splicing_manifest)?.absoulutize(&opt.workspace_dir); + let extra_manifests_manifest = + ExtraManifestsManifest::try_from_path(opt.extra_manifests_manifest)?.absoulutize(); + + let temp_dir = tempfile::tempdir().context("Failed to create temporary directory")?; + + // Generate a splicer for creating a Cargo workspace manifest + let splicer = Splicer::new( + PathBuf::from(temp_dir.as_ref()), + splicing_manifest, + extra_manifests_manifest, + ) + .context("Failed to crate splicer")?; + + // Splice together the manifest + let manifest_path = splicer + .splice_workspace() + .context("Failed to splice workspace")?; + + // Generate a lockfile + let cargo_lockfile = + generate_lockfile(&manifest_path, &opt.cargo_lockfile, &opt.cargo, &opt.rustc)?; + + // Write the registry url info to the manifest now that a lockfile has been generated + WorkspaceMetadata::write_registry_urls(&cargo_lockfile, &manifest_path)?; + + // Write metadata to the workspace for future reuse + let (cargo_metadata, cargo_lockfile) = Generator::new() + .with_cargo(opt.cargo.clone()) + .with_rustc(opt.rustc.clone()) + .generate(&manifest_path.as_path_buf())?; + + // Load the config from disk + let config = Config::try_from_path(&opt.config)?; + + // Annotate metadata + let annotations = Annotations::new(cargo_metadata, cargo_lockfile, config.clone())?; + + // Generate renderable contexts for earch package + let context = Context::new(annotations)?; + + // Render build files + let outputs = Renderer::new(config.rendering.clone()).render(&context)?; + + // Cache the file names for potential use with buildifier + let file_names: BTreeSet = outputs.keys().cloned().collect(); + + // First ensure vendoring and rendering happen in a clean directory + let vendor_dir_label = render_module_label(&config.rendering.crates_module_template, "BUILD")?; + let vendor_dir = opt + .workspace_dir + .join(vendor_dir_label.package.unwrap_or_default()); + if vendor_dir.exists() { + fs::remove_dir_all(&vendor_dir) + .with_context(|| format!("Failed to delete {}", vendor_dir.display()))?; + } + + // Vendor the crates from the spliced workspace + if matches!(config.rendering.vendor_mode, Some(VendorMode::Local)) { + VendorGenerator::new(opt.cargo.clone(), opt.rustc.clone()) + .generate(manifest_path.as_path_buf(), &vendor_dir) + .context("Failed to vendor dependencies")?; + } + + // Write outputs + write_outputs(outputs, &opt.workspace_dir, opt.dry_run) + .context("Failed writing output files")?; + + // Optionally apply buildifier fixes + if let Some(buildifier_bin) = opt.buildifier { + for file in file_names { + let file_path = opt.workspace_dir.join(file); + buildifier_format(&buildifier_bin, &file_path) + .with_context(|| format!("Failed to run buildifier on {}", file_path.display()))?; + } + } + + Ok(()) +} diff --git a/crate_universe/src/config.rs b/crate_universe/src/config.rs index 8ca704e1da..66e3a7ebae 100644 --- a/crate_universe/src/config.rs +++ b/crate_universe/src/config.rs @@ -1,154 +1,495 @@ -use std::{ - collections::{BTreeMap, BTreeSet, HashMap}, - path::PathBuf, -}; - -use serde::{Deserialize, Serialize}; -use url::Url; - -use crate::{ - consolidator::{ConsolidatorConfig, ConsolidatorOverride}, - parser::merge_cargo_tomls, - renderer::RenderConfig, - resolver::{Resolver, ResolverConfig}, -}; - -#[derive(Debug, Deserialize, Serialize, Eq, PartialEq, Ord, PartialOrd)] -pub struct Package { - pub name: String, - pub semver: String, - pub features: Vec, +//! A module for configuration information + +use std::collections::{BTreeMap, BTreeSet}; +use std::convert::AsRef; +use std::iter::Sum; +use std::ops::Add; +use std::path::Path; +use std::{fmt, fs}; + +use anyhow::Result; +use cargo_lock::package::source::GitReference; +use cargo_metadata::Package; +use semver::VersionReq; +use serde::de::Visitor; +use serde::{Deserialize, Serialize, Serializer}; + +/// Representations of different kinds of crate vendoring into workspaces. +#[derive(Debug, Serialize, Deserialize, Hash, Clone)] +#[serde(rename_all = "lowercase")] +pub enum VendorMode { + /// Crates having full source being vendored into a workspace + Local, + + /// Crates having only BUILD files with repository rules vendored into a workspace + Remote, } -#[derive(Debug, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct Override { - // Mapping of environment variables key -> value. - pub extra_rustc_env_vars: BTreeMap, - // Mapping of environment variables key -> value. - pub extra_build_script_env_vars: BTreeMap, - // Mapping of target triple or spec -> extra bazel target dependencies. - pub extra_bazel_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target data dependencies. - pub extra_bazel_data_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target build script dependencies. - pub extra_build_script_bazel_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target build script data dependencies. - pub extra_build_script_bazel_data_deps: BTreeMap>, - // Features to remove from crates (e.g. which are needed when building with Cargo but not with Bazel). - pub features_to_remove: BTreeSet, -} - -// Options which affect the contents of the generated output should be on this struct. -// These fields all end up hashed into the lockfile hash. -// -// Anything which doesn't affect the contents of the generated output should live on `Opt` in `main.rs`. -#[derive(Debug, Deserialize, Serialize)] +impl std::fmt::Display for VendorMode { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Display::fmt( + match self { + VendorMode::Local => "local", + VendorMode::Remote => "remote", + }, + f, + ) + } +} + +#[derive(Debug, Default, Hash, Serialize, Deserialize, Clone)] #[serde(deny_unknown_fields)] -pub struct Config { +pub struct RenderConfig { + /// The name of the repository being rendered pub repository_name: String, - pub packages: Vec, - pub cargo_toml_files: BTreeMap, - pub overrides: HashMap, + /// The pattern to use for BUILD file names. + /// Eg. `//:BUILD.{name}-{version}.bazel` + #[serde(default = "default_build_file_template")] + pub build_file_template: String, + + /// The pattern to use for a crate target. + /// Eg. `@{repository}__{name}-{version}//:{target}` + #[serde(default = "default_crate_label_template")] + pub crate_label_template: String, - pub target_triples: BTreeSet, + /// The pattern to use for the `defs.bzl` and `BUILD.bazel` + /// file names used for the crates module. + /// Eg. `//:{file}` + #[serde(default = "default_crates_module_template")] + pub crates_module_template: String, - pub cargo: PathBuf, + /// The pattern used for a crate's repository name. + /// Eg. `{repository}__{name}-{version}` + #[serde(default = "default_crate_repository_template")] + pub crate_repository_template: String, - #[serde(default = "default_rules_rust_workspace_name")] - pub rust_rules_workspace_name: String, + /// The default of the `package_name` parameter to use for the module macros like `all_crate_deps`. + /// In general, this should be be unset to allow the macros to do auto-detection in the analysis phase. + pub default_package_name: Option, - #[serde(default = "default_default_registry_index_url")] - pub default_registry_index_url: Url, - /// Template of the URL from which to download crates, which are assumed to be gzip'd tar files. - /// This string may contain arbitrarily many instances of {crate} and {version} which will be - /// replaced by crate names and versions. - #[serde(default = "default_default_registry_download_url_template")] - pub default_registry_download_url_template: String, + /// The pattern to use for platform constraints. + /// Eg. `@rules_rust//rust/platform:{triple}`. + #[serde(default = "default_platforms_template")] + pub platforms_template: String, - pub additional_registries: BTreeMap, + /// An optional configuration for rendirng content to be rendered into repositories. + pub vendor_mode: Option, } -impl Config { - pub fn preprocess(mut self) -> anyhow::Result { - self.packages.sort(); - - let known_registries: BTreeSet<_> = self.additional_registries.keys().cloned().collect(); - - let (toml_contents, label_to_crates) = - merge_cargo_tomls(&known_registries, self.cargo_toml_files, self.packages)?; - - let overrides = self - .overrides - .into_iter() - .map(|(krate, overryde)| { - ( - krate, - ConsolidatorOverride { - extra_rustc_env_vars: overryde.extra_rustc_env_vars, - extra_build_script_env_vars: overryde.extra_build_script_env_vars, - extra_bazel_deps: overryde.extra_bazel_deps, - extra_build_script_bazel_deps: overryde.extra_build_script_bazel_deps, - extra_bazel_data_deps: overryde.extra_bazel_data_deps, - extra_build_script_bazel_data_deps: overryde - .extra_build_script_bazel_data_deps, - features_to_remove: overryde.features_to_remove, - }, - ) +fn default_build_file_template() -> String { + "//:BUILD.{name}-{version}.bazel".to_owned() +} + +fn default_crates_module_template() -> String { + "//:{file}".to_owned() +} + +fn default_crate_label_template() -> String { + "@{repository}__{name}-{version}//:{target}".to_owned() +} + +fn default_crate_repository_template() -> String { + "{repository}__{name}-{version}".to_owned() +} + +fn default_platforms_template() -> String { + "@rules_rust//rust/platform:{triple}".to_owned() +} + +/// A representation of some Git identifier used to represent the "revision" or "pin" of a checkout. +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord)] +pub enum Commitish { + /// From a tag. + Tag(String), + + /// From the HEAD of a branch. + Branch(String), + + /// From a specific revision. + Rev(String), +} + +impl From for Commitish { + fn from(git_ref: GitReference) -> Self { + match git_ref { + GitReference::Tag(v) => Self::Tag(v), + GitReference::Branch(v) => Self::Branch(v), + GitReference::Rev(v) => Self::Rev(v), + } + } +} + +/// Information representing deterministic identifiers for some remote asset. +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] +pub enum Checksumish { + Http { + /// The sha256 digest of an http archive + sha256: Option, + }, + Git { + /// The revision of the git repository + commitsh: Commitish, + + /// An optional date, not after the specified commit; the argument is + /// not allowed if a tag is specified (which allows cloning with depth + /// 1). + shallow_since: Option, + }, +} + +#[derive(Debug, Default, Hash, Deserialize, Serialize, Clone)] +pub struct CrateAnnotations { + /// Determins whether or not Cargo build scripts should be generated for the current package + pub gen_build_script: Option, + + /// Additional data to pass to + /// [deps](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-deps) attribute. + pub deps: Option>, + + /// Additional data to pass to + /// [proc_macro_deps](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-proc_macro_deps) attribute. + pub proc_macro_deps: Option>, + + /// Additional data to pass to the target's + /// [crate_features](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-crate_features) attribute. + pub crate_features: Option>, + + /// Additional data to pass to the target's + /// [data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-data) attribute. + pub data: Option>, + + /// An optional glob pattern to set on the + /// [data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-data) attribute. + pub data_glob: Option>, + + /// Additional data to pass to + /// [compile_data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-compile_data) attribute. + pub compile_data: Option>, + + /// An optional glob pattern to set on the + /// [compile_data](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-compile_data) attribute. + pub compile_data_glob: Option>, + + /// Additional data to pass to the target's + /// [rustc_env](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_env) attribute. + pub rustc_env: Option>, + + /// Additional data to pass to the target's + /// [rustc_env_files](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_env_files) attribute. + pub rustc_env_files: Option>, + + /// Additional data to pass to the target's + /// [rustc_flags](https://bazelbuild.github.io/rules_rust/defs.html#rust_library-rustc_flags) attribute. + pub rustc_flags: Option>, + + /// Additional dependencies to pass to a build script's + /// [deps](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-deps) attribute. + pub build_script_deps: Option>, + + /// Additional data to pass to a build script's + /// [proc_macro_deps](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-proc_macro_deps) attribute. + pub build_script_proc_macro_deps: Option>, + + /// Additional data to pass to a build script's + /// [build_script_data](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-data) attribute. + pub build_script_data: Option>, + + /// Additional data to pass to a build script's + /// [tools](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-tools) attribute. + pub build_script_tools: Option>, + + /// An optional glob pattern to set on the + /// [build_script_data](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-build_script_env) attribute. + pub build_script_data_glob: Option>, + + /// Additional environment variables to pass to a build script's + /// [build_script_env](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-rustc_env) attribute. + pub build_script_env: Option>, + + /// Additional rustc_env flags to pass to a build script's + /// [rustc_env](https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script-rustc_env) attribute. + pub build_script_rustc_env: Option>, + + /// A scratch pad used to write arbitrary text to target BUILD files. + pub additive_build_file_content: Option, + + /// For git sourced crates, this is a the + /// [git_repository::shallow_since](https://docs.bazel.build/versions/main/repo/git.html#new_git_repository-shallow_since) attribute. + pub shallow_since: Option, + + /// The `patch_args` attribute of a Bazel repository rule. See + /// [http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args) + pub patch_args: Option>, + + /// The `patch_tool` attribute of a Bazel repository rule. See + /// [http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool) + pub patch_tool: Option, + + /// The `patches` attribute of a Bazel repository rule. See + /// [http_archive.patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches) + pub patches: Option>, +} + +macro_rules! joined_extra_member { + ($lhs:expr, $rhs:expr, $fn_new:expr, $fn_extend:expr) => { + if let Some(lhs) = $lhs { + if let Some(rhs) = $rhs { + let mut new = $fn_new(); + $fn_extend(&mut new, lhs); + $fn_extend(&mut new, rhs); + Some(new) + } else { + Some(lhs) + } + } else if $rhs.is_some() { + $rhs + } else { + None + } + }; +} + +impl Add for CrateAnnotations { + type Output = CrateAnnotations; + + fn add(self, rhs: Self) -> Self::Output { + let shallow_since = if self.shallow_since.is_some() { + self.shallow_since + } else if rhs.shallow_since.is_some() { + rhs.shallow_since + } else { + None + }; + + let patch_tool = if self.patch_tool.is_some() { + self.patch_tool + } else if rhs.patch_tool.is_some() { + rhs.patch_tool + } else { + None + }; + + let gen_build_script = if self.gen_build_script.is_some() { + self.gen_build_script + } else if rhs.gen_build_script.is_some() { + rhs.gen_build_script + } else { + None + }; + + let concat_string = |lhs: &mut String, rhs: String| { + *lhs = format!("{}{}", lhs, rhs); + }; + + #[rustfmt::skip] + let output = CrateAnnotations { + gen_build_script, + deps: joined_extra_member!(self.deps, rhs.deps, BTreeSet::new, BTreeSet::extend), + proc_macro_deps: joined_extra_member!(self.proc_macro_deps, rhs.proc_macro_deps, BTreeSet::new, BTreeSet::extend), + crate_features: joined_extra_member!(self.crate_features, rhs.crate_features, BTreeSet::new, BTreeSet::extend), + data: joined_extra_member!(self.data, rhs.data, BTreeSet::new, BTreeSet::extend), + data_glob: joined_extra_member!(self.data_glob, rhs.data_glob, BTreeSet::new, BTreeSet::extend), + compile_data: joined_extra_member!(self.compile_data, rhs.compile_data, BTreeSet::new, BTreeSet::extend), + compile_data_glob: joined_extra_member!(self.compile_data_glob, rhs.compile_data_glob, BTreeSet::new, BTreeSet::extend), + rustc_env: joined_extra_member!(self.rustc_env, rhs.rustc_env, BTreeMap::new, BTreeMap::extend), + rustc_env_files: joined_extra_member!(self.rustc_env_files, rhs.rustc_env_files, BTreeSet::new, BTreeSet::extend), + rustc_flags: joined_extra_member!(self.rustc_flags, rhs.rustc_flags, Vec::new, Vec::extend), + build_script_deps: joined_extra_member!(self.build_script_deps, rhs.build_script_deps, BTreeSet::new, BTreeSet::extend), + build_script_proc_macro_deps: joined_extra_member!(self.build_script_proc_macro_deps, rhs.build_script_proc_macro_deps, BTreeSet::new, BTreeSet::extend), + build_script_data: joined_extra_member!(self.build_script_data, rhs.build_script_data, BTreeSet::new, BTreeSet::extend), + build_script_tools: joined_extra_member!(self.build_script_tools, rhs.build_script_tools, BTreeSet::new, BTreeSet::extend), + build_script_data_glob: joined_extra_member!(self.build_script_data_glob, rhs.build_script_data_glob, BTreeSet::new, BTreeSet::extend), + build_script_env: joined_extra_member!(self.build_script_env, rhs.build_script_env, BTreeMap::new, BTreeMap::extend), + build_script_rustc_env: joined_extra_member!(self.build_script_rustc_env, rhs.build_script_rustc_env, BTreeMap::new, BTreeMap::extend), + additive_build_file_content: joined_extra_member!(self.additive_build_file_content, rhs.additive_build_file_content, String::new, concat_string), + shallow_since, + patch_args: joined_extra_member!(self.patch_args, rhs.patch_args, Vec::new, Vec::extend), + patch_tool, + patches: joined_extra_member!(self.patches, rhs.patches, BTreeSet::new, BTreeSet::extend), + }; + + output + } +} + +impl Sum for CrateAnnotations { + fn sum>(iter: I) -> Self { + iter.fold(CrateAnnotations::default(), |a, b| a + b) + } +} + +/// A unique identifier for Crates +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] +pub struct CrateId { + /// The name of the crate + pub name: String, + + /// The crate's semantic version + pub version: String, +} + +impl CrateId { + /// Construct a new [CrateId] + pub fn new(name: String, version: String) -> Self { + Self { name, version } + } + + /// Compares a [CrateId] against a [cargo_metadata::Package]. + pub fn matches(&self, package: &Package) -> bool { + // If the package name does not match, it's obviously + // not the right package + if self.name != "*" && self.name != package.name { + return false; + } + + // First see if the package version matches exactly + if package.version.to_string() == self.version { + return true; + } + + // Next, check to see if the version provided is a semver req and + // check if the package matches the condition + if let Ok(semver) = VersionReq::parse(&self.version) { + if semver.matches(&package.version) { + return true; + } + } + + false + } +} + +impl From<&Package> for CrateId { + fn from(package: &Package) -> Self { + Self { + name: package.name.clone(), + version: package.version.to_string(), + } + } +} + +impl Serialize for CrateId { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&format!("{} {}", self.name, self.version)) + } +} + +struct CrateIdVisitor; +impl<'de> Visitor<'de> for CrateIdVisitor { + type Value = CrateId; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("Expected string value of `{name} {version}`.") + } + + fn visit_str(self, v: &str) -> Result + where + E: serde::de::Error, + { + v.rsplit_once(' ') + .map(|(name, version)| CrateId { + name: name.to_string(), + version: version.to_string(), + }) + .ok_or_else(|| { + E::custom(format!( + "Expected string value of `{{name}} {{version}}`. Got '{}'", + v + )) }) - .collect(); - - Ok(Resolver::new( - toml_contents.into(), - ResolverConfig { - cargo: self.cargo, - default_registry_index_url: self.default_registry_index_url, - default_registry_download_url_template: self.default_registry_download_url_template, - additional_registries: self.additional_registries, - }, - ConsolidatorConfig { overrides }, - RenderConfig { - repo_rule_name: self.repository_name.clone(), - rules_rust_workspace_name: self.rust_rules_workspace_name.clone(), - }, - self.target_triples, - label_to_crates, - )) } } -// TODO: maybe remove the "+buildmetadata" suffix to consolidate e.g. "1.2.3+foo" and "1.2.3". -/// Generate the repo rule name from the target like cargo-raze. -/// e.g. `0.18.0-alpha.2+test` -> `0_18_0_alpha_2_test`. -pub fn crate_to_repo_rule_name(repo_rule_name: &str, name: &str, version: &str) -> String { - format!( - "{repo_rule_name}__{name}__{version}", - repo_rule_name = repo_rule_name, - name = name.replace("-", "_"), - version = version - .replace(".", "_") - .replace("+", "_") - .replace("-", "_") - ) +impl<'de> Deserialize<'de> for CrateId { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + deserializer.deserialize_str(CrateIdVisitor) + } } -pub fn crate_to_label(repo_rule_name: &str, crate_name: &str, crate_version: &str) -> String { - format!( - "@{repo_name}//:{name}", - repo_name = crate_to_repo_rule_name(repo_rule_name, crate_name, crate_version), - name = crate_name.replace("-", "_") - ) +impl std::fmt::Display for CrateId { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&format!("{} {}", self.name, self.version), f) + } } -pub fn default_rules_rust_workspace_name() -> String { - String::from("rules_rust") +/// Workspace specific settings to control how targets are generated +#[derive(Debug, Default, Serialize, Deserialize, Clone)] +#[serde(deny_unknown_fields)] +pub struct Config { + /// Whether or not to generate Cargo build scripts by default + pub generate_build_scripts: bool, + + /// Additional settings to apply to generated crates + #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] + pub annotations: BTreeMap, + + /// Settings used to determine various render info + pub rendering: RenderConfig, + + /// The contents of a Cargo configuration file + pub cargo_config: Option, + + /// A set of platform triples to use in generated select statements + #[serde(default, skip_serializing_if = "BTreeSet::is_empty")] + pub supported_platform_triples: BTreeSet, } -fn default_default_registry_index_url() -> Url { - Url::parse("https://github.com/rust-lang/crates.io-index").expect("Invalid default index URL") +impl Config { + pub fn try_from_path>(path: T) -> Result { + let data = fs::read_to_string(path)?; + Ok(serde_json::from_str(&data)?) + } } -fn default_default_registry_download_url_template() -> String { - String::from("https://crates.io/api/v1/crates/{crate}/{version}/download") +#[cfg(test)] +mod test { + use super::*; + + use crate::test::*; + + #[test] + fn test_crate_id_serde() { + let id: CrateId = serde_json::from_str("\"crate 0.1.0\"").unwrap(); + assert_eq!(id, CrateId::new("crate".to_owned(), "0.1.0".to_owned())); + assert_eq!(serde_json::to_string(&id).unwrap(), "\"crate 0.1.0\""); + } + + #[test] + fn test_crate_id_serde_semver() { + let semver_id: CrateId = serde_json::from_str("\"crate *\"").unwrap(); + assert_eq!(semver_id, CrateId::new("crate".to_owned(), "*".to_owned())); + assert_eq!(serde_json::to_string(&semver_id).unwrap(), "\"crate *\""); + } + + #[test] + fn test_crate_id_matches() { + let mut package = mock_cargo_metadata_package(); + let id = CrateId::new("mock-pkg".to_owned(), "0.1.0".to_owned()); + + package.version = cargo_metadata::Version::new(0, 1, 0); + assert!(id.matches(&package)); + + package.version = cargo_metadata::Version::new(1, 0, 0); + assert!(!id.matches(&package)); + } + + #[test] + fn test_crate_id_semver_matches() { + let mut package = mock_cargo_metadata_package(); + package.version = cargo_metadata::Version::new(1, 0, 0); + let mut id = CrateId::new("mock-pkg".to_owned(), "0.1.0".to_owned()); + + id.version = "*".to_owned(); + assert!(id.matches(&package)); + + id.version = "<1".to_owned(); + assert!(!id.matches(&package)); + } } diff --git a/crate_universe/src/consolidator.rs b/crate_universe/src/consolidator.rs deleted file mode 100644 index 1ba6a105c2..0000000000 --- a/crate_universe/src/consolidator.rs +++ /dev/null @@ -1,261 +0,0 @@ -use std::collections::{BTreeMap, BTreeSet}; - -use anyhow::anyhow; -use cargo_raze::context::{ - BuildableDependency, CrateContext, CrateDependencyContext, CrateTargetedDepContext, -}; -use cargo_raze::util::get_matching_bazel_triples; -use cfg_expr::targets::get_builtin_target_by_triple; -use itertools::Itertools; -use semver::Version; - -use crate::{ - renderer::{RenderConfig, Renderer}, - resolver::Dependencies, -}; - -#[derive(Debug, Default)] -pub struct ConsolidatorOverride { - // Mapping of environment variables key -> value. - pub extra_rustc_env_vars: BTreeMap, - // Mapping of environment variables key -> value. - pub extra_build_script_env_vars: BTreeMap, - // Mapping of target triple or spec -> extra bazel target dependencies. - pub extra_bazel_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target data dependencies. - pub extra_bazel_data_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target build script dependencies. - pub extra_build_script_bazel_deps: BTreeMap>, - // Mapping of target triple or spec -> extra bazel target build script data dependencies. - pub extra_build_script_bazel_data_deps: BTreeMap>, - - pub features_to_remove: BTreeSet, -} - -pub struct ConsolidatorConfig { - // Mapping of crate name to override struct. - pub overrides: BTreeMap, -} - -pub struct Consolidator { - consolidator_config: ConsolidatorConfig, - render_config: RenderConfig, - digest: String, - target_triples: BTreeSet, - resolved_packages: Vec, - member_packages_version_mapping: Dependencies, - label_to_crates: BTreeMap>, -} - -impl Consolidator { - pub(crate) fn new( - consolidator_config: ConsolidatorConfig, - render_config: RenderConfig, - digest: String, - target_triples: BTreeSet, - resolved_packages: Vec, - member_packages_version_mapping: Dependencies, - label_to_crates: BTreeMap>, - ) -> Self { - Consolidator { - consolidator_config, - render_config, - digest, - target_triples, - resolved_packages, - member_packages_version_mapping, - label_to_crates, - } - } - - fn targeted_dep_context_for( - target: &str, - target_triples_filter: &BTreeSet, - ) -> CrateTargetedDepContext { - let platform_targets: Vec<_> = { - if target.starts_with("cfg(") { - // User passed a cfg(...) configuration. - get_matching_bazel_triples( - &target.to_owned(), - &Some(target_triples_filter.iter().cloned().collect()), - ) - .map_or_else(|_err| Vec::new(), |i| i.map(|v| v.to_owned()).collect()) - } else { - // User passed a triple. - match get_builtin_target_by_triple(target) { - Some(_) => vec![target.to_owned()], - _ => vec![], - } - } - }; - if platform_targets.is_empty() { - panic!( - "Target {} in rule attribute doesn't map to any triple", - &target - ) - } - - CrateTargetedDepContext { - target: target.to_owned(), - deps: CrateDependencyContext { - dependencies: BTreeSet::new(), - proc_macro_dependencies: BTreeSet::new(), - data_dependencies: BTreeSet::new(), - build_dependencies: BTreeSet::new(), - build_proc_macro_dependencies: BTreeSet::new(), - build_data_dependencies: BTreeSet::new(), - dev_dependencies: BTreeSet::new(), - aliased_dependencies: BTreeMap::new(), - }, - platform_targets, - } - } - - // Generate a Vec of CrateTargetedDepContext with the deps/data contents from the provided arguments. - fn extra_deps_as_targeted_deps( - target_triples_filter: &BTreeSet, - extra_bazel_deps: I, - extra_bazel_data_deps: I, - extra_build_script_bazel_deps: I, - extra_build_script_bazel_data_deps: I, - ) -> Vec - where - I: IntoIterator)>, - { - let mut crate_targeted_dep_contexts: BTreeMap = - Default::default(); - - let into_buildable_dependency = |dep: &String| BuildableDependency { - name: "".to_string(), - version: Version::new(0, 0, 0), - buildable_target: dep.clone(), - is_proc_macro: false, - }; - - extra_bazel_deps.into_iter().for_each(|(target, deps)| { - let targeted_dep_context = crate_targeted_dep_contexts - .entry(target.clone()) - .or_insert_with(|| Self::targeted_dep_context_for(&target, target_triples_filter)); - targeted_dep_context - .deps - .dependencies - .extend(deps.iter().map(into_buildable_dependency)); - }); - extra_bazel_data_deps - .into_iter() - .for_each(|(target, deps)| { - let targeted_dep_context = crate_targeted_dep_contexts - .entry(target.clone()) - .or_insert_with(|| { - Self::targeted_dep_context_for(&target, target_triples_filter) - }); - targeted_dep_context - .deps - .data_dependencies - .extend(deps.iter().map(into_buildable_dependency)); - }); - - extra_build_script_bazel_deps - .into_iter() - .for_each(|(target, deps)| { - let targeted_dep_context = crate_targeted_dep_contexts - .entry(target.clone()) - .or_insert_with(|| { - Self::targeted_dep_context_for(&target, target_triples_filter) - }); - targeted_dep_context - .deps - .build_dependencies - .extend(deps.iter().map(into_buildable_dependency)); - }); - - extra_build_script_bazel_data_deps - .into_iter() - .for_each(|(target, deps)| { - let targeted_dep_context = crate_targeted_dep_contexts - .entry(target.clone()) - .or_insert_with(|| { - Self::targeted_dep_context_for(&target, target_triples_filter) - }); - targeted_dep_context - .deps - .build_data_dependencies - .extend(deps.iter().map(into_buildable_dependency)); - }); - - crate_targeted_dep_contexts - .into_iter() - .sorted() - .map(|(_, targeted_dep_context)| targeted_dep_context) - .collect() - } - - pub fn consolidate(self) -> anyhow::Result { - let Self { - mut consolidator_config, - render_config, - digest, - target_triples, - mut resolved_packages, - member_packages_version_mapping, - label_to_crates, - } = self; - - let mut names_and_versions_to_count = BTreeMap::new(); - for pkg in &resolved_packages { - *names_and_versions_to_count - .entry((pkg.pkg_name.clone(), pkg.pkg_version.clone())) - .or_insert(0_usize) += 1_usize; - } - let duplicates: Vec<_> = names_and_versions_to_count - .into_iter() - .filter_map(|((name, version), value)| { - if value > 1 { - Some(format!("{} {}", name, version)) - } else { - None - } - }) - .collect(); - if !duplicates.is_empty() { - return Err(anyhow!( - "Got duplicate sources for identical crate name and version combination{}: {}", - if duplicates.len() == 1 { "" } else { "s" }, - duplicates.join(", ") - )); - } - - // Apply overrides specified in the crate_universe repo rule. - for pkg in &mut resolved_packages { - if let Some(overryde) = consolidator_config.overrides.remove(&pkg.pkg_name) { - // Add extra dependencies. - pkg.targeted_deps.extend(Self::extra_deps_as_targeted_deps( - &target_triples, - overryde.extra_bazel_deps.into_iter(), - overryde.extra_bazel_data_deps.into_iter(), - overryde.extra_build_script_bazel_deps.into_iter(), - overryde.extra_build_script_bazel_data_deps.into_iter(), - )); - // Add extra environment variables. - pkg.raze_settings - .additional_env - .extend(overryde.extra_rustc_env_vars.into_iter()); - // Add extra build script environment variables. - pkg.raze_settings - .buildrs_additional_environment_variables - .extend(overryde.extra_build_script_env_vars.into_iter()); - - let features_to_remove = overryde.features_to_remove; - pkg.features.retain(|f| !features_to_remove.contains(f)); - } - } - - Ok(Renderer::new( - render_config, - digest, - resolved_packages, - member_packages_version_mapping, - label_to_crates, - )) - } -} diff --git a/crate_universe/src/context.rs b/crate_universe/src/context.rs new file mode 100644 index 0000000000..3a4fb9c4c3 --- /dev/null +++ b/crate_universe/src/context.rs @@ -0,0 +1,511 @@ +//! Convert annotated metadata into a renderable context + +pub mod crate_context; +mod platforms; + +use std::collections::{BTreeMap, BTreeSet}; +use std::fs; +use std::path::{Path, PathBuf}; + +use anyhow::Result; +use serde::{Deserialize, Serialize}; + +use crate::config::CrateId; +use crate::context::crate_context::{CrateContext, CrateDependency, Rule}; +use crate::context::platforms::resolve_cfg_platforms; +use crate::lockfile::Digest; +use crate::metadata::Annotations; +use crate::utils::starlark::{Select, SelectList}; + +pub use self::crate_context::*; + +/// A struct containing information about a Cargo dependency graph in an easily to consume +/// format for rendering reproducible Bazel targets. +#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +pub struct Context { + /// The collective checksum of all inputs to the context + pub checksum: Option, + + /// The collection of all crates that make up the dependency graph + pub crates: BTreeMap, + + /// A subset of only crates with binary targets + pub binary_crates: BTreeSet, + + /// A subset of workspace members mapping to their workspace + /// path relative to the workspace root + pub workspace_members: BTreeMap, + + /// A mapping of `cfg` flags to platform triples supporting the configuration + pub conditions: BTreeMap>, +} + +impl Context { + pub fn try_from_path>(path: T) -> Result { + let data = fs::read_to_string(path.as_ref())?; + Ok(serde_json::from_str(&data)?) + } + + pub fn new(annotations: Annotations) -> Result { + // Build a map of crate contexts + let crates: BTreeMap = annotations + .metadata + .crates + .iter() + // Convert the crate annotations into more renderable contexts + .map(|(_, annotation)| { + let context = CrateContext::new( + annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &annotations.pairred_extras, + annotations.config.generate_build_scripts, + ); + let id = CrateId::new(context.name.clone(), context.version.clone()); + (id, context) + }) + .collect(); + + // Filter for any crate that contains a binary + let binary_crates: BTreeSet = crates + .iter() + .filter(|(_, ctx)| ctx.targets.iter().any(|t| matches!(t, Rule::Binary(..)))) + // Only consider remote repositories (so non-workspace members). + .filter(|(_, ctx)| ctx.repository.is_some()) + .map(|(id, _)| id.clone()) + .collect(); + + // Given a list of all conditional dependencies, build a set of platform + // triples which satsify the conditions. + let conditions = resolve_cfg_platforms( + crates.values().collect(), + &annotations.config.supported_platform_triples, + )?; + + // Generate a list of all workspace members + let workspace_members = annotations + .metadata + .workspace_members + .iter() + .filter_map(|id| { + let pkg = &annotations.metadata.packages[id]; + let package_path_id = match Self::get_package_path_id( + pkg, + &annotations.metadata.workspace_root, + &annotations.metadata.workspace_metadata.workspace_prefix, + &annotations.metadata.workspace_metadata.package_prefixes, + ) { + Ok(id) => id, + Err(e) => return Some(Err(e)), + }; + let crate_id = CrateId::new(pkg.name.clone(), pkg.version.to_string()); + + // Crates that have repository information are not considered workspace members. + // The assumpion is that they are "extra workspace members". + match crates[&crate_id].repository { + Some(_) => None, + None => Some(Ok((crate_id, package_path_id))), + } + }) + .collect::>>()?; + + Ok(Self { + checksum: None, + crates, + binary_crates, + workspace_members, + conditions, + }) + } + + // A helper function for locating the unique path in a workspace to a workspace member + fn get_package_path_id( + package: &cargo_metadata::Package, + workspace_root: &Path, + workspace_prefix: &Option, + package_prefixes: &BTreeMap, + ) -> Result { + // Locate the package's manifest directory + let manifest_dir = package + .manifest_path + .parent() + .expect("Every manifest should have a parent") + .as_std_path(); + + // Compare it with the root of the workspace + let package_path_diff = pathdiff::diff_paths(manifest_dir, workspace_root) + .expect("Every workspace member's manifest is a child of the workspace root"); + + // Ensure the package paths are adjusted in the macros according to the splicing results + let package_path = match package_prefixes.get(&package.name) { + // Any package prefix should be absolute and therefore always applied + Some(prefix) => PathBuf::from(prefix).join(package_path_diff), + // If no package prefix is present, attempt to apply the workspace prefix + // since workspace members would not have shown up with their own label + None => match workspace_prefix { + Some(prefix) => PathBuf::from(prefix).join(package_path_diff), + None => package_path_diff, + }, + }; + + // Sanitize the path for increased consistency + let package_path_id = package_path + .display() + .to_string() + .replace('\\', "/") + .trim_matches('/') + .to_owned(); + + Ok(package_path_id) + } + + /// Filter a crate's dependencies to only ones with aliases + pub fn crate_aliases( + &self, + crate_id: &CrateId, + build: bool, + include_dev: bool, + ) -> SelectList<&CrateDependency> { + let ctx = &self.crates[crate_id]; + let mut set = SelectList::default(); + + // Return a set of aliases for build dependencies + // vs normal dependencies when requested. + if build { + // Note that there may not be build dependencies so no dependencies + // will be gathered in this case + if let Some(attrs) = &ctx.build_script_attrs { + let collection: Vec<(Option, &CrateDependency)> = attrs + .deps + .configurations() + .into_iter() + .flat_map(move |conf| { + attrs + .deps + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }) + .chain(attrs.proc_macro_deps.configurations().into_iter().flat_map( + move |conf| { + attrs + .proc_macro_deps + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }, + )) + .collect(); + + for (config, dep) in collection { + set.insert(dep, config); + } + } + } else { + let attrs = &ctx.common_attrs; + let mut collection: Vec<(Option, &CrateDependency)> = + attrs + .deps + .configurations() + .into_iter() + .flat_map(move |conf| { + attrs + .deps + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }) + .chain(attrs.proc_macro_deps.configurations().into_iter().flat_map( + move |conf| { + attrs + .proc_macro_deps + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }, + )) + .collect(); + + // Optionally include dev dependencies + if include_dev { + collection = collection + .into_iter() + .chain( + attrs + .deps_dev + .configurations() + .into_iter() + .flat_map(move |conf| { + attrs + .deps_dev + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }), + ) + .chain( + attrs + .proc_macro_deps_dev + .configurations() + .into_iter() + .flat_map(move |conf| { + attrs + .proc_macro_deps_dev + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.alias.is_some()) + .map(move |dep| (conf.cloned(), dep)) + }), + ) + .collect(); + } + + for (config, dep) in collection { + set.insert(dep, config); + } + } + + set + } + + /// Create a set of all direct dependencies of workspace member crates and map them to + /// optional alternative names that allow them to be uniquely identified. This typically + /// results in a mapping of ([CrateId], [None]) where [None] defaults to using the crate + /// name. The next most common would be using ([CrateId], `Some(alias)`) as some projects + /// may use aliases in Cargo as a way to differentiate different versions of the same dep. + pub fn flat_workspace_member_deps(&self) -> BTreeMap> { + let workspace_member_dependencies: BTreeSet = self + .workspace_members + .iter() + .map(|(id, _)| &self.crates[id]) + .flat_map(|ctx| { + // Build an interator of all dependency CrateIds. + // TODO: This expansion is horribly verbose and should be refactored but closures + // were not playing nice when I tried it. + ctx.common_attrs + .deps + .configurations() + .into_iter() + .flat_map(move |conf| { + ctx.common_attrs + .deps + .get_iter(conf) + .expect("Lookup should be guaranteed") + }) + .chain( + ctx.common_attrs + .deps_dev + .configurations() + .into_iter() + .flat_map(move |conf| { + ctx.common_attrs + .deps_dev + .get_iter(conf) + .expect("Lookup should be guaranteed") + }), + ) + .chain( + ctx.common_attrs + .proc_macro_deps + .configurations() + .into_iter() + .flat_map(move |conf| { + ctx.common_attrs + .proc_macro_deps + .get_iter(conf) + .expect("Lookup should be guaranteed") + }), + ) + .chain( + ctx.common_attrs + .proc_macro_deps_dev + .configurations() + .into_iter() + .flat_map(move |conf| { + ctx.common_attrs + .proc_macro_deps_dev + .get_iter(conf) + .expect("Lookup should be guaranteed") + }), + ) + }) + .cloned() + .collect(); + + // Search for any duplicate workspace member definitions + let duplicate_deps: Vec = workspace_member_dependencies + .iter() + .filter(|dep| { + workspace_member_dependencies + .iter() + .filter(|check| dep.id.name == check.id.name) + .count() + > 1 + }) + .cloned() + .collect(); + + workspace_member_dependencies + .into_iter() + .map(|dep| { + if duplicate_deps.contains(&dep) { + if let Some(alias) = &dep.alias { + // Check for any duplicate aliases + let aliases = duplicate_deps + .iter() + .filter(|dupe| dupe.id.name == dep.id.name) + .filter(|dupe| dupe.alias.is_some()) + .filter(|dupe| dupe.alias == dep.alias); + + // If there are multiple aliased crates with the same name, the name is updated to + // be `{alias}-{version}` to differentiate them. + if aliases.count() >= 2 { + let rename = format!("{}-{}", &alias, &dep.id.version); + (dep.id, Some(rename)) + } else { + (dep.id, Some(alias.clone())) + } + } else { + // Check for all duplicates that match the current dependency and have no alias + let unaliased = duplicate_deps + .iter() + .filter(|dupe| dupe.id.name == dep.id.name) + .filter(|dupe| dupe.alias.is_none()); + + // If there are multiple unaliased crates with the same name, the name is updated to + // be `{name}-{version}` to differentiate them. + if unaliased.count() >= 2 { + let rename = format!("{}-{}", &dep.id.name, &dep.id.version); + (dep.id, Some(rename)) + } else { + (dep.id, None) + } + } + } else { + (dep.id, dep.alias) + } + }) + .collect() + } + + /// Produce a list of binary dependencies with optional aliases which prevent duplicate + /// targets from being generated. + pub fn flat_binary_deps(&self) -> BTreeMap> { + // Check for any duplicate binary crate names. If one exists provide an alias to differentiate them + self.binary_crates + .iter() + .map(|crate_id| { + let dupe_count = self + .binary_crates + .iter() + .filter(|id| crate_id.name == id.name) + .count(); + // For targets that appear twice (which can happen if one crate aliases a binary dependency) + if dupe_count >= 2 { + let rename = format!("{}-{}", crate_id.name, crate_id.version); + (crate_id.clone(), Some(rename)) + } else { + (crate_id.clone(), None) + } + }) + .collect() + } +} + +#[cfg(test)] +mod test { + use super::*; + + use crate::config::Config; + + fn mock_context_common() -> Context { + let annotations = Annotations::new( + crate::test::metadata::common(), + crate::test::lockfile::common(), + Config::default(), + ) + .unwrap(); + + Context::new(annotations).unwrap() + } + + fn mock_context_aliases() -> Context { + let annotations = Annotations::new( + crate::test::metadata::alias(), + crate::test::lockfile::alias(), + Config::default(), + ) + .unwrap(); + + Context::new(annotations).unwrap() + } + + #[test] + fn flat_workspace_member_deps() { + let context = mock_context_common(); + let workspace_member_deps = context.flat_workspace_member_deps(); + + assert_eq!( + workspace_member_deps, + BTreeMap::from([ + ( + CrateId::new("bitflags".to_owned(), "1.3.2".to_owned()), + None + ), + (CrateId::new("cfg-if".to_owned(), "1.0.0".to_owned()), None), + ]) + ); + } + + #[test] + fn flat_workspace_member_deps_with_alises() { + let context = mock_context_aliases(); + let workspace_member_deps = context.flat_workspace_member_deps(); + + assert_eq!( + workspace_member_deps, + BTreeMap::from([ + ( + CrateId { + name: "log".to_owned(), + version: "0.3.9".to_owned(), + }, + Some("pinned_log".to_owned()) + ), + ( + CrateId { + name: "log".to_owned(), + version: "0.4.14".to_owned(), + }, + None + ), + ( + CrateId { + name: "names".to_owned(), + version: "0.11.1-dev".to_owned(), + }, + Some("pinned_names".to_owned()) + ), + ( + CrateId { + name: "names".to_owned(), + version: "0.12.0".to_owned(), + }, + None + ), + ( + CrateId { + name: "value-bag".to_owned(), + version: "1.0.0-alpha.7".to_owned(), + }, + None + ), + ]) + ); + } +} diff --git a/crate_universe/src/context/crate_context.rs b/crate_universe/src/context/crate_context.rs new file mode 100644 index 0000000000..0278ebeb60 --- /dev/null +++ b/crate_universe/src/context/crate_context.rs @@ -0,0 +1,838 @@ +//! Crate specific information embedded into [crate::context::Context] objects. + +use std::collections::{BTreeMap, BTreeSet}; + +use cargo_metadata::{Node, Package, PackageId}; +use serde::{Deserialize, Serialize}; + +use crate::config::CrateId; +use crate::metadata::{CrateAnnotation, Dependency, PairredExtras, SourceAnnotation}; +use crate::utils::sanitize_module_name; +use crate::utils::starlark::{Glob, SelectList, SelectMap, SelectStringDict, SelectStringList}; + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +pub struct CrateDependency { + /// The [CrateId] of the dependency + pub id: CrateId, + + /// The target name of the dependency. Note this may differ from the + /// dependency's package name in cases such as build scripts. + pub target: String, + + /// Some dependencies are assigned aliases. This is tracked here + #[serde(default, skip_serializing_if = "Option::is_none")] + pub alias: Option, +} + +#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +#[serde(default)] +pub struct TargetAttributes { + /// The module name of the crate (notably, not the package name). + pub crate_name: String, + + /// The path to the crate's root source file, relative to the manifest. + pub crate_root: Option, + + /// A glob pattern of all source files required by the target + pub srcs: Glob, +} + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +pub enum Rule { + /// `cargo_build_script` + BuildScript(TargetAttributes), + + /// `rust_proc_macro` + ProcMacro(TargetAttributes), + + /// `rust_library` + Library(TargetAttributes), + + /// `rust_binary` + Binary(TargetAttributes), +} + +/// A set of attributes common to most `rust_library`, `rust_proc_macro`, and other +/// [core rules of `rules_rust`](https://bazelbuild.github.io/rules_rust/defs.html). +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +#[serde(default)] +pub struct CommonAttributes { + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub compile_data: SelectStringList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub compile_data_glob: BTreeSet, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub crate_features: BTreeSet, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub data: SelectStringList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub data_glob: BTreeSet, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub deps: SelectList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub extra_deps: BTreeSet, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub deps_dev: SelectList, + + pub edition: String, + + #[serde(skip_serializing_if = "Option::is_none")] + pub linker_script: Option, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub proc_macro_deps: SelectList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub extra_proc_macro_deps: BTreeSet, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub proc_macro_deps_dev: SelectList, + + #[serde(skip_serializing_if = "SelectStringDict::should_skip_serializing")] + pub rustc_env: SelectStringDict, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub rustc_env_files: SelectStringList, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub rustc_flags: SelectStringList, + + pub version: String, + + #[serde(skip_serializing_if = "Vec::is_empty")] + pub tags: Vec, +} + +impl Default for CommonAttributes { + fn default() -> Self { + Self { + compile_data: Default::default(), + // Generated targets include all files in their package by default + compile_data_glob: BTreeSet::from(["**".to_owned()]), + crate_features: Default::default(), + data: Default::default(), + data_glob: Default::default(), + deps: Default::default(), + extra_deps: Default::default(), + deps_dev: Default::default(), + edition: Default::default(), + linker_script: Default::default(), + proc_macro_deps: Default::default(), + extra_proc_macro_deps: Default::default(), + proc_macro_deps_dev: Default::default(), + rustc_env: Default::default(), + rustc_env_files: Default::default(), + rustc_flags: Default::default(), + version: Default::default(), + tags: Default::default(), + } + } +} + +// Build script attributes. See +// https://bazelbuild.github.io/rules_rust/cargo.html#cargo_build_script +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +#[serde(default)] +pub struct BuildScriptAttributes { + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub compile_data: SelectStringList, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub data: SelectStringList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub data_glob: BTreeSet, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub deps: SelectList, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub extra_deps: BTreeSet, + + #[serde(skip_serializing_if = "SelectStringDict::should_skip_serializing")] + pub build_script_env: SelectStringDict, + + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + pub extra_proc_macro_deps: BTreeSet, + + #[serde(skip_serializing_if = "SelectList::should_skip_serializing")] + pub proc_macro_deps: SelectList, + + #[serde(skip_serializing_if = "SelectStringDict::should_skip_serializing")] + pub rustc_env: SelectStringDict, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub rustc_flags: SelectStringList, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub rustc_env_files: SelectStringList, + + #[serde(skip_serializing_if = "SelectStringList::should_skip_serializing")] + pub tools: SelectStringList, + + #[serde(skip_serializing_if = "Option::is_none")] + pub links: Option, +} + +impl Default for BuildScriptAttributes { + fn default() -> Self { + Self { + compile_data: Default::default(), + data: Default::default(), + // Build scripts include all sources by default + data_glob: BTreeSet::from(["**".to_owned()]), + deps: Default::default(), + extra_deps: Default::default(), + build_script_env: Default::default(), + extra_proc_macro_deps: Default::default(), + proc_macro_deps: Default::default(), + rustc_env: Default::default(), + rustc_flags: Default::default(), + rustc_env_files: Default::default(), + tools: Default::default(), + links: Default::default(), + } + } +} + +#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] +#[serde(default)] +pub struct CrateContext { + /// The package name of the current crate + pub name: String, + + /// The full version of the current crate + pub version: String, + + /// Optional source annotations if they were discoverable in the + /// lockfile. Workspace Members will not have source annotations and + /// potentially others. + pub repository: Option, + + /// A list of all targets (lib, proc-macro, bin) associated with this package + pub targets: Vec, + + /// The name of the crate's root library target. This is the target that a dependent + /// would get if they were to depend on `{crate_name}`. + pub library_target_name: Option, + + /// A set of attributes common to most [Rule] types or target types. + pub common_attrs: CommonAttributes, + + /// Optional attributes for build scripts. This field is only populated if + /// a build script (`custom-build`) target is defined for the crate. + #[serde(skip_serializing_if = "Option::is_none")] + pub build_script_attrs: Option, + + /// The license used by the crate + pub license: Option, + + /// Additional text to add to the generated BUILD file. + #[serde(skip_serializing_if = "Option::is_none")] + pub additive_build_file_content: Option, +} + +impl CrateContext { + pub fn new( + annotation: &CrateAnnotation, + packages: &BTreeMap, + source_annotations: &BTreeMap, + extras: &BTreeMap, + include_build_scripts: bool, + ) -> Self { + let package: &Package = &packages[&annotation.node.id]; + let current_crate_id = CrateId::new(package.name.clone(), package.version.to_string()); + + let new_crate_dep = |dep: Dependency| -> CrateDependency { + let pkg = &packages[&dep.package_id]; + + // Unfortunately, The package graph and resolve graph of cargo metadata have different representations + // for the crate names (resolve graph sanitizes names to match module names) so to get the rest of this + // content to align when rendering, the dependency target needs to be explicitly sanitized. + let target = sanitize_module_name(&dep.target_name); + + CrateDependency { + id: CrateId::new(pkg.name.clone(), pkg.version.to_string()), + target, + alias: dep.alias, + } + }; + + // Convert the dependencies into renderable strings + let deps = annotation.deps.normal_deps.clone().map(new_crate_dep); + let deps_dev = annotation.deps.normal_dev_deps.clone().map(new_crate_dep); + let proc_macro_deps = annotation.deps.proc_macro_deps.clone().map(new_crate_dep); + let proc_macro_deps_dev = annotation + .deps + .proc_macro_dev_deps + .clone() + .map(new_crate_dep); + + // Gather all "common" attributes + let mut common_attrs = CommonAttributes { + crate_features: annotation.node.features.iter().cloned().collect(), + deps, + deps_dev, + edition: package.edition.clone(), + proc_macro_deps, + proc_macro_deps_dev, + version: package.version.to_string(), + ..Default::default() + }; + + let include_build_scripts = + Self::crate_includes_build_script(package, extras, include_build_scripts); + + // Iterate over each target and produce a Bazel target for all supported "kinds" + let targets = Self::collect_targets(&annotation.node, packages, include_build_scripts); + + // Parse the library crate name from the set of included targets + let library_target_name = { + let lib_targets: Vec<&TargetAttributes> = targets + .iter() + .filter_map(|t| match t { + Rule::ProcMacro(attrs) => Some(attrs), + Rule::Library(attrs) => Some(attrs), + _ => None, + }) + .collect(); + + // TODO: There should only be at most 1 library target. This case + // should be handled in a more intelligent way. + assert!(lib_targets.len() <= 1); + lib_targets + .iter() + .last() + .map(|attr| attr.crate_name.clone()) + }; + + // Gather any build-script related attributes + let build_script_target = targets.iter().find_map(|r| match r { + Rule::BuildScript(attr) => Some(attr), + _ => None, + }); + + let build_script_attrs = if let Some(target) = build_script_target { + // Track the build script dependency + common_attrs.deps.insert( + CrateDependency { + id: current_crate_id, + target: target.crate_name.clone(), + alias: None, + }, + None, + ); + + let build_deps = annotation.deps.build_deps.clone().map(new_crate_dep); + let build_proc_macro_deps = annotation + .deps + .build_proc_macro_deps + .clone() + .map(new_crate_dep); + + Some(BuildScriptAttributes { + deps: build_deps, + proc_macro_deps: build_proc_macro_deps, + links: package.links.clone(), + ..Default::default() + }) + } else { + None + }; + + // Save the repository information for the current crate + let repository = source_annotations.get(&package.id).cloned(); + + // Identify the license type + let license = package.license.clone(); + + // Create the crate's context and apply extra settings + CrateContext { + name: package.name.clone(), + version: package.version.to_string(), + repository, + targets, + library_target_name, + common_attrs, + build_script_attrs, + license, + additive_build_file_content: None, + } + .with_overrides(extras) + } + + fn with_overrides(mut self, extras: &BTreeMap) -> Self { + let id = CrateId::new(self.name.clone(), self.version.clone()); + + // Insert all overrides/extras + if let Some(pairred_override) = extras.get(&id) { + let crate_extra = &pairred_override.crate_extra; + + // Deps + if let Some(extra) = &crate_extra.deps { + self.common_attrs.extra_deps = extra.clone(); + } + + // Proc macro deps + if let Some(extra) = &crate_extra.proc_macro_deps { + self.common_attrs.extra_proc_macro_deps = extra.clone(); + } + + // Compile data + if let Some(extra) = &crate_extra.compile_data { + for data in extra.iter() { + self.common_attrs.compile_data.insert(data.clone(), None); + } + } + + // Compile data glob + if let Some(extra) = &crate_extra.compile_data_glob { + self.common_attrs.compile_data_glob.extend(extra.clone()); + } + + // Crate features + if let Some(extra) = &crate_extra.crate_features { + for data in extra.iter() { + self.common_attrs.crate_features.insert(data.clone()); + } + } + + // Data + if let Some(extra) = &crate_extra.data { + for data in extra.iter() { + self.common_attrs.data.insert(data.clone(), None); + } + } + + // Data glob + if let Some(extra) = &crate_extra.data_glob { + self.common_attrs.data_glob.extend(extra.clone()); + } + + // Rustc flags + // TODO: SelectList is currently backed by `BTreeSet` which is generally incorrect + // for rustc flags. Should SelectList be refactored? + if let Some(extra) = &crate_extra.rustc_flags { + for data in extra.iter() { + self.common_attrs.rustc_flags.insert(data.clone(), None); + } + } + + // Rustc env + if let Some(extra) = &crate_extra.rustc_env { + self.common_attrs.rustc_env.insert(extra.clone(), None); + } + + // Rustc env files + if let Some(extra) = &crate_extra.rustc_env_files { + for data in extra.iter() { + self.common_attrs.rustc_env_files.insert(data.clone(), None); + } + } + + // Build script Attributes + if let Some(attrs) = &mut self.build_script_attrs { + // Deps + if let Some(extra) = &crate_extra.build_script_deps { + attrs.extra_deps = extra.clone(); + } + + // Proc macro deps + if let Some(extra) = &crate_extra.build_script_proc_macro_deps { + attrs.extra_proc_macro_deps = extra.clone(); + } + + // Data + if let Some(extra) = &crate_extra.build_script_data { + for data in extra { + attrs.data.insert(data.clone(), None); + } + } + + // Data glob + if let Some(extra) = &crate_extra.build_script_data_glob { + attrs.data_glob.extend(extra.clone()); + } + + // Rustc env + if let Some(extra) = &crate_extra.build_script_rustc_env { + attrs.rustc_env.insert(extra.clone(), None); + } + + // Build script env + if let Some(extra) = &crate_extra.build_script_env { + attrs.build_script_env.insert(extra.clone(), None); + } + } + + // Extra build contents + self.additive_build_file_content = crate_extra + .additive_build_file_content + .as_ref() + .map(|content| { + // For prettier rendering, dedent the build contents + textwrap::dedent(content) + }); + + // Git shallow_since + if let Some(SourceAnnotation::Git { shallow_since, .. }) = &mut self.repository { + *shallow_since = crate_extra.shallow_since.clone() + } + + // Patch attributes + if let Some(repository) = &mut self.repository { + match repository { + SourceAnnotation::Git { + patch_args, + patch_tool, + patches, + .. + } => { + *patch_args = crate_extra.patch_args.clone(); + *patch_tool = crate_extra.patch_tool.clone(); + *patches = crate_extra.patches.clone(); + } + SourceAnnotation::Http { + patch_args, + patch_tool, + patches, + .. + } => { + *patch_args = crate_extra.patch_args.clone(); + *patch_tool = crate_extra.patch_tool.clone(); + *patches = crate_extra.patches.clone(); + } + } + } + } + + self + } + + /// Determine whether or not a crate __should__ include a build script + /// (build.rs) if it happens to have one. + fn crate_includes_build_script( + package: &Package, + overrides: &BTreeMap, + default_generate_build_script: bool, + ) -> bool { + // Locate extra settings for the current package. + let settings = overrides + .iter() + .find(|(_, settings)| settings.package_id == package.id); + + // If the crate has extra settings, which explicitly set `gen_build_script`, always use + // this value, otherwise, fallback to the provided default. + settings + .and_then(|(_, settings)| settings.crate_extra.gen_build_script) + .unwrap_or(default_generate_build_script) + } + + /// Collect all Bazel targets that should be generated for a particular Package + fn collect_targets( + node: &Node, + packages: &BTreeMap, + include_build_scripts: bool, + ) -> Vec { + let package = &packages[&node.id]; + + let package_root = package + .manifest_path + .as_std_path() + .parent() + .expect("Every manifest should have a parent directory"); + + package + .targets + .iter() + .flat_map(|target| { + target + .kind + .iter() + .filter_map(|kind| { + // Unfortunately, The package graph and resolve graph of cargo metadata have different representations + // for the crate names (resolve graph sanitizes names to match module names) so to get the rest of this + // content to align when rendering, the package target names are always sanitized. + let crate_name = sanitize_module_name(&target.name); + + // Locate the crate's root source file relative to the package root normalized for unix + let crate_root = + pathdiff::diff_paths(target.src_path.to_string(), package_root).map( + // Normalize the path so that it always renders the same regardless of platform + |root| root.to_string_lossy().replace("\\", "/"), + ); + + // Conditionally check to see if the dependencies is a build-script target + if include_build_scripts && kind == "custom-build" { + return Some(Rule::BuildScript(TargetAttributes { + crate_name, + crate_root, + srcs: Glob::new_rust_srcs(), + })); + } + + // Check to see if the dependencies is a proc-macro target + if kind == "proc-macro" { + return Some(Rule::ProcMacro(TargetAttributes { + crate_name, + crate_root, + srcs: Glob::new_rust_srcs(), + })); + } + + // Check to see if the dependencies is a library target + if ["lib", "rlib"].contains(&kind.as_str()) { + return Some(Rule::Library(TargetAttributes { + crate_name, + crate_root, + srcs: Glob::new_rust_srcs(), + })); + } + + // Check to see if the dependencies is a library target + if kind == "bin" { + return Some(Rule::Binary(TargetAttributes { + crate_name: target.name.clone(), + crate_root, + srcs: Glob::new_rust_srcs(), + })); + } + + None + }) + .collect::>() + }) + .collect() + } +} + +#[cfg(test)] +mod test { + use super::*; + + use crate::config::CrateAnnotations; + use crate::metadata::Annotations; + + fn common_annotations() -> Annotations { + Annotations::new( + crate::test::metadata::common(), + crate::test::lockfile::common(), + crate::config::Config::default(), + ) + .unwrap() + } + + #[test] + fn new_context() { + let annotations = common_annotations(); + + let crate_annotation = &annotations.metadata.crates[&PackageId { + repr: "common 0.1.0 (path+file://{TEMP_DIR}/common)".to_owned(), + }]; + + let context = CrateContext::new( + crate_annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &annotations.pairred_extras, + false, + ); + + assert_eq!(context.name, "common"); + assert_eq!( + context.targets, + vec![ + Rule::Library(TargetAttributes { + crate_name: "common".to_owned(), + crate_root: Some("lib.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }), + Rule::Binary(TargetAttributes { + crate_name: "common-bin".to_owned(), + crate_root: Some("main.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }), + ] + ); + } + + #[test] + fn context_with_overrides() { + let annotations = common_annotations(); + + let package_id = PackageId { + repr: "common 0.1.0 (path+file://{TEMP_DIR}/common)".to_owned(), + }; + + let crate_annotation = &annotations.metadata.crates[&package_id]; + + let mut pairred_extras = BTreeMap::new(); + pairred_extras.insert( + CrateId::new("common".to_owned(), "0.1.0".to_owned()), + PairredExtras { + package_id, + crate_extra: CrateAnnotations { + data_glob: Some(BTreeSet::from(["**/data_glob/**".to_owned()])), + ..CrateAnnotations::default() + }, + }, + ); + + let context = CrateContext::new( + crate_annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &pairred_extras, + false, + ); + + assert_eq!(context.name, "common"); + assert_eq!( + context.targets, + vec![ + Rule::Library(TargetAttributes { + crate_name: "common".to_owned(), + crate_root: Some("lib.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }), + Rule::Binary(TargetAttributes { + crate_name: "common-bin".to_owned(), + crate_root: Some("main.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }), + ] + ); + assert_eq!( + context.common_attrs.data_glob, + BTreeSet::from(["**/data_glob/**".to_owned()]) + ); + } + + fn build_script_annotations() -> Annotations { + Annotations::new( + crate::test::metadata::build_scripts(), + crate::test::lockfile::build_scripts(), + crate::config::Config::default(), + ) + .unwrap() + } + + fn crate_type_annotations() -> Annotations { + Annotations::new( + crate::test::metadata::crate_types(), + crate::test::lockfile::crate_types(), + crate::config::Config::default(), + ) + .unwrap() + } + + #[test] + fn context_with_build_script() { + let annotations = build_script_annotations(); + + let package_id = PackageId { + repr: "openssl-sys 0.9.72 (registry+https://github.com/rust-lang/crates.io-index)" + .to_owned(), + }; + + let crate_annotation = &annotations.metadata.crates[&package_id]; + + let context = CrateContext::new( + crate_annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &annotations.pairred_extras, + true, + ); + + assert_eq!(context.name, "openssl-sys"); + assert!(context.build_script_attrs.is_some()); + assert_eq!( + context.targets, + vec![ + Rule::Library(TargetAttributes { + crate_name: "openssl_sys".to_owned(), + crate_root: Some("src/lib.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }), + Rule::BuildScript(TargetAttributes { + crate_name: "build_script_main".to_owned(), + crate_root: Some("build/main.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + }) + ] + ); + + // Cargo build scripts should include all sources + assert!(context.build_script_attrs.unwrap().data_glob.contains("**")); + } + + #[test] + fn context_disabled_build_script() { + let annotations = build_script_annotations(); + + let package_id = PackageId { + repr: "openssl-sys 0.9.72 (registry+https://github.com/rust-lang/crates.io-index)" + .to_owned(), + }; + + let crate_annotation = &annotations.metadata.crates[&package_id]; + + let context = CrateContext::new( + crate_annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &annotations.pairred_extras, + false, + ); + + assert_eq!(context.name, "openssl-sys"); + assert!(context.build_script_attrs.is_none()); + assert_eq!( + context.targets, + vec![Rule::Library(TargetAttributes { + crate_name: "openssl_sys".to_owned(), + crate_root: Some("src/lib.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + })], + ); + } + + #[test] + fn context_rlib_crate_type() { + let annotations = crate_type_annotations(); + + let package_id = PackageId { + repr: "sysinfo 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)" + .to_owned(), + }; + + let crate_annotation = &annotations.metadata.crates[&package_id]; + + let context = CrateContext::new( + crate_annotation, + &annotations.metadata.packages, + &annotations.lockfile.crates, + &annotations.pairred_extras, + false, + ); + + assert_eq!(context.name, "sysinfo"); + assert!(context.build_script_attrs.is_none()); + assert_eq!( + context.targets, + vec![Rule::Library(TargetAttributes { + crate_name: "sysinfo".to_owned(), + crate_root: Some("src/lib.rs".to_owned()), + srcs: Glob::new_rust_srcs(), + })], + ); + } +} diff --git a/crate_universe/src/context/platforms.rs b/crate_universe/src/context/platforms.rs new file mode 100644 index 0000000000..724dbd01fe --- /dev/null +++ b/crate_universe/src/context/platforms.rs @@ -0,0 +1,269 @@ +use std::collections::{BTreeMap, BTreeSet, HashMap}; + +use anyhow::{anyhow, Context, Result}; +use cfg_expr::targets::{get_builtin_target_by_triple, TargetInfo}; +use cfg_expr::{Expression, Predicate}; + +use crate::context::CrateContext; +use crate::utils::starlark::Select; + +/// Walk through all dependencies in a [CrateContext] list for all configuration specific +/// dependencies to produce a mapping of configuration to compatible platform triples. +pub fn resolve_cfg_platforms( + crates: Vec<&CrateContext>, + supported_platform_triples: &BTreeSet, +) -> Result>> { + // Collect all unique configurations from all dependencies into a single set + let configurations: BTreeSet = crates + .iter() + .flat_map(|ctx| { + let attr = &ctx.common_attrs; + attr.deps + .configurations() + .into_iter() + .chain(attr.deps_dev.configurations().into_iter()) + .chain(attr.proc_macro_deps.configurations().into_iter()) + .chain(attr.proc_macro_deps_dev.configurations().into_iter()) + // Chain the build dependencies if some are defined + .chain(if let Some(attr) = &ctx.build_script_attrs { + attr.deps + .configurations() + .into_iter() + .chain(attr.proc_macro_deps.configurations().into_iter()) + .collect::>>() + .into_iter() + } else { + BTreeSet::new().into_iter() + }) + .flatten() + }) + .cloned() + .collect(); + + // Generate target information for each triple string + let target_infos = supported_platform_triples + .iter() + .map(|t| match get_builtin_target_by_triple(t) { + Some(info) => Ok(info), + None => Err(anyhow!( + "Invalid platform triple in supported platforms: {}", + t + )), + }) + .collect::>>()?; + + // `cfg-expr` does not understand configurations that are simply platform triples + // (`x86_64-unknown-linux-gun` vs `cfg(target = "x86_64-unkonwn-linux-gnu")`). So + // in order to parse configurations, the text is renamed for the check but the + // original is retained for comaptibility with the manifest. + let rename = |cfg: &str| -> String { format!("cfg(target = \"{}\")", cfg) }; + let original_cfgs: HashMap = configurations + .iter() + .filter(|cfg| !cfg.starts_with("cfg(")) + .map(|cfg| (rename(cfg), cfg.clone())) + .collect(); + + configurations + .into_iter() + // `cfg-expr` requires that the expressions be actual `cfg` expressions. Any time + // there's a target triple (which is a valid constraint), convert it to a cfg expression. + .map(|cfg| match cfg.starts_with("cfg(") { + true => cfg.to_string(), + false => rename(&cfg), + }) + // Check the current configuration with against each supported triple + .map(|cfg| { + let expression = Expression::parse(&cfg) + .context(format!("Failed to parse expression: '{}'", cfg))?; + + let triples = target_infos + .iter() + .filter(|info| { + expression.eval(|p| match p { + Predicate::Target(tp) => tp.matches(**info), + Predicate::KeyValue { key, val } => { + *key == "target" && val == &info.triple.as_str() + } + // For now there is no other kind of matching + _ => false, + }) + }) + .map(|info| info.triple.to_string()) + .collect(); + + // Map any renamed configurations back to their original IDs + let cfg = match original_cfgs.get(&cfg) { + Some(orig) => orig.clone(), + None => cfg, + }; + + Ok((cfg, triples)) + }) + .collect() +} + +#[cfg(test)] +mod test { + use crate::config::CrateId; + use crate::context::crate_context::CrateDependency; + use crate::context::CommonAttributes; + use crate::utils::starlark::SelectList; + + use super::*; + + fn supported_platform_triples() -> BTreeSet { + BTreeSet::from([ + "aarch64-apple-darwin".to_owned(), + "aarch64-apple-ios".to_owned(), + "aarch64-linux-android".to_owned(), + "aarch64-unknown-linux-gnu".to_owned(), + "arm-unknown-linux-gnueabi".to_owned(), + "armv7-unknown-linux-gnueabi".to_owned(), + "i686-apple-darwin".to_owned(), + "i686-linux-android".to_owned(), + "i686-pc-windows-msvc".to_owned(), + "i686-unknown-freebsd".to_owned(), + "i686-unknown-linux-gnu".to_owned(), + "powerpc-unknown-linux-gnu".to_owned(), + "s390x-unknown-linux-gnu".to_owned(), + "wasm32-unknown-unknown".to_owned(), + "wasm32-wasi".to_owned(), + "x86_64-apple-darwin".to_owned(), + "x86_64-apple-ios".to_owned(), + "x86_64-linux-android".to_owned(), + "x86_64-pc-windows-msvc".to_owned(), + "x86_64-unknown-freebsd".to_owned(), + "x86_64-unknown-linux-gnu".to_owned(), + ]) + } + + #[test] + fn resolve_no_targeted() { + let mut deps = SelectList::default(); + deps.insert( + CrateDependency { + id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()), + target: "mock_crate_b".to_owned(), + alias: None, + }, + None, + ); + + let context = CrateContext { + name: "mock_crate_a".to_owned(), + version: "0.1.0".to_owned(), + common_attrs: CommonAttributes { + deps, + ..CommonAttributes::default() + }, + ..CrateContext::default() + }; + + let configurations = + resolve_cfg_platforms(vec![&context], &supported_platform_triples()).unwrap(); + + assert_eq!(configurations, BTreeMap::new(),) + } + + #[test] + fn resolve_targeted() { + let configuration = r#"cfg(target = "x86_64-unknown-linux-gnu")"#.to_owned(); + let mut deps = SelectList::default(); + deps.insert( + CrateDependency { + id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()), + target: "mock_crate_b".to_owned(), + alias: None, + }, + Some(configuration.clone()), + ); + + let context = CrateContext { + name: "mock_crate_a".to_owned(), + version: "0.1.0".to_owned(), + common_attrs: CommonAttributes { + deps, + ..CommonAttributes::default() + }, + ..CrateContext::default() + }; + + let configurations = + resolve_cfg_platforms(vec![&context], &supported_platform_triples()).unwrap(); + + assert_eq!( + configurations, + BTreeMap::from([( + configuration, + BTreeSet::from(["x86_64-unknown-linux-gnu".to_owned()]) + )]) + ); + } + + #[test] + fn resolve_platforms() { + let configuration = r#"x86_64-unknown-linux-gnu"#.to_owned(); + let mut deps = SelectList::default(); + deps.insert( + CrateDependency { + id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()), + target: "mock_crate_b".to_owned(), + alias: None, + }, + Some(configuration.clone()), + ); + + let context = CrateContext { + name: "mock_crate_a".to_owned(), + version: "0.1.0".to_owned(), + common_attrs: CommonAttributes { + deps, + ..CommonAttributes::default() + }, + ..CrateContext::default() + }; + + let configurations = + resolve_cfg_platforms(vec![&context], &supported_platform_triples()).unwrap(); + + assert_eq!( + configurations, + BTreeMap::from([( + configuration, + BTreeSet::from(["x86_64-unknown-linux-gnu".to_owned()]) + )]) + ); + } + + #[test] + fn resolve_unsupported_targeted() { + let configuration = r#"cfg(target = "x86_64-unknown-unknown")"#.to_owned(); + let mut deps = SelectList::default(); + deps.insert( + CrateDependency { + id: CrateId::new("mock_crate_b".to_owned(), "0.1.0".to_owned()), + target: "mock_crate_b".to_owned(), + alias: None, + }, + Some(configuration.clone()), + ); + + let context = CrateContext { + name: "mock_crate_a".to_owned(), + version: "0.1.0".to_owned(), + common_attrs: CommonAttributes { + deps, + ..CommonAttributes::default() + }, + ..CrateContext::default() + }; + + let configurations = + resolve_cfg_platforms(vec![&context], &supported_platform_triples()).unwrap(); + + assert_eq!( + configurations, + BTreeMap::from([(configuration, BTreeSet::new())]) + ); + } +} diff --git a/crate_universe/src/lib.rs b/crate_universe/src/lib.rs index 1d5776f60f..ae857172b2 100644 --- a/crate_universe/src/lib.rs +++ b/crate_universe/src/lib.rs @@ -1,28 +1,12 @@ -use std::path::{Path, PathBuf}; +pub mod cli; -use std::io::Write; - -pub mod config; -pub mod consolidator; -pub mod parser; -pub mod renderer; -pub mod resolver; -mod serde_utils; +mod config; +mod context; +mod lockfile; +mod metadata; +mod rendering; +mod splicing; +mod utils; #[cfg(test)] -mod testing; - -pub struct NamedTempFile(tempfile::TempDir, PathBuf); - -impl NamedTempFile { - pub fn with_str_content>(name: P, content: &str) -> std::io::Result { - let dir = tempfile::tempdir()?; - let path = dir.path().join(name.as_ref()); - let mut file = std::fs::File::create(&path)?; - write!(file, "{}", content)?; - Ok(Self(dir, path)) - } - pub fn path(&self) -> &Path { - &self.1 - } -} +mod test; diff --git a/crate_universe/src/lockfile.rs b/crate_universe/src/lockfile.rs new file mode 100644 index 0000000000..91f48321a8 --- /dev/null +++ b/crate_universe/src/lockfile.rs @@ -0,0 +1,423 @@ +//! Utility module for interracting with different kinds of lock files + +use std::convert::TryFrom; +use std::ffi::OsStr; +use std::fs; +use std::path::Path; +use std::process::Command; +use std::str::FromStr; + +use anyhow::{bail, Context as AnyhowContext, Result}; +use hex::ToHex; +use serde::{Deserialize, Serialize}; +use sha2::{Digest as Sha2Digest, Sha256}; + +use crate::config::Config; +use crate::context::Context; +use crate::splicing::{SplicingManifest, SplicingMetadata}; + +#[derive(Debug)] +pub enum LockfileKind { + Auto, + Bazel, + Cargo, +} + +impl LockfileKind { + pub fn detect(path: &Path) -> Result { + let content = fs::read_to_string(path)?; + + if serde_json::from_str::(&content).is_ok() { + return Ok(Self::Bazel); + } + + if cargo_lock::Lockfile::from_str(&content).is_ok() { + return Ok(Self::Cargo); + } + + bail!("Unknown Lockfile kind for {}", path.display()) + } +} + +impl FromStr for LockfileKind { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { + let lower = s.to_lowercase(); + if lower == "auto" { + return Ok(Self::Auto); + } + + if lower == "bazel" { + return Ok(Self::Bazel); + } + + if lower == "cargo" { + return Ok(Self::Cargo); + } + + bail!("Unknown LockfileKind: '{}'", s) + } +} + +pub fn is_cargo_lockfile(path: &Path, kind: &LockfileKind) -> bool { + match kind { + LockfileKind::Auto => match LockfileKind::detect(path) { + Ok(kind) => matches!(kind, LockfileKind::Cargo), + Err(_) => false, + }, + LockfileKind::Bazel => false, + LockfileKind::Cargo => true, + } +} + +pub fn lock_context( + mut context: Context, + config: &Config, + splicing_manifest: &SplicingManifest, + cargo_bin: &Path, + rustc_bin: &Path, +) -> Result { + // Ensure there is no existing checksum which could impact the lockfile results + context.checksum = None; + + let checksum = Digest::new(&context, config, splicing_manifest, cargo_bin, rustc_bin) + .context("Failed to generate context digest")?; + + Ok(Context { + checksum: Some(checksum), + ..context + }) +} + +/// Write a [crate::planning::PlannedContext] to disk +pub fn write_lockfile(lockfile: Context, path: &Path, dry_run: bool) -> Result<()> { + let content = serde_json::to_string_pretty(&lockfile)?; + + if dry_run { + println!("{:#?}", content); + } else { + // Ensure the parent directory exists + if let Some(parent) = path.parent() { + fs::create_dir_all(parent)?; + } + fs::write(path, content + "\n") + .context(format!("Failed to write file to disk: {}", path.display()))?; + } + + Ok(()) +} + +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Clone)] +pub struct Digest(String); + +impl Digest { + pub fn new( + context: &Context, + config: &Config, + splicing_manifest: &SplicingManifest, + cargo_bin: &Path, + rustc_bin: &Path, + ) -> Result { + let splicing_metadata = SplicingMetadata::try_from((*splicing_manifest).clone())?; + let cargo_version = Self::bin_version(cargo_bin)?; + let rustc_version = Self::bin_version(rustc_bin)?; + let cargo_bazel_version = env!("CARGO_PKG_VERSION"); + + // Ensure the checksum of a digest is not present before computing one + Ok(match context.checksum { + Some(_) => Self::compute( + &Context { + checksum: None, + ..context.clone() + }, + config, + &splicing_metadata, + cargo_bazel_version, + &cargo_version, + &rustc_version, + ), + None => Self::compute( + context, + config, + &splicing_metadata, + cargo_bazel_version, + &cargo_version, + &rustc_version, + ), + }) + } + + fn compute( + context: &Context, + config: &Config, + splicing_metadata: &SplicingMetadata, + cargo_bazel_version: &str, + cargo_version: &str, + rustc_version: &str, + ) -> Self { + // Since this method is private, it should be expected that context is + // always None. This then allows us to have this method not return a + // Result. + debug_assert!(context.checksum.is_none()); + + let mut hasher = Sha256::new(); + + hasher.update(cargo_bazel_version.as_bytes()); + hasher.update(b"\0"); + + hasher.update(serde_json::to_string(context).unwrap().as_bytes()); + hasher.update(b"\0"); + + hasher.update(serde_json::to_string(config).unwrap().as_bytes()); + hasher.update(b"\0"); + + hasher.update(serde_json::to_string(splicing_metadata).unwrap().as_bytes()); + hasher.update(b"\0"); + + hasher.update(cargo_version.as_bytes()); + hasher.update(b"\0"); + + hasher.update(rustc_version.as_bytes()); + hasher.update(b"\0"); + + Self(hasher.finalize().encode_hex::()) + } + + fn bin_version(binary: &Path) -> Result { + let safe_vars = [OsStr::new("HOMEDRIVE"), OsStr::new("PATHEXT")]; + let env = std::env::vars_os().filter(|(var, _)| safe_vars.contains(&var.as_os_str())); + + let output = Command::new(binary) + .arg("--version") + .env_clear() + .envs(env) + .output()?; + + if !output.status.success() { + bail!("Failed to query cargo version") + } + + let version = String::from_utf8(output.stdout)?; + Ok(version) + } +} + +impl PartialEq for Digest { + fn eq(&self, other: &str) -> bool { + self.0 == other + } +} + +impl PartialEq for Digest { + fn eq(&self, other: &String) -> bool { + &self.0 == other + } +} + +#[cfg(test)] +mod test { + use crate::config::{CrateAnnotations, CrateId}; + use crate::splicing::cargo_config::{AdditionalRegistry, CargoConfig, Registry}; + + use super::*; + + use std::collections::{BTreeMap, BTreeSet}; + use std::fs; + + #[test] + fn simple_digest() { + let context = Context::default(); + let config = Config::default(); + let splicing_metadata = SplicingMetadata::default(); + + let digest = Digest::compute( + &context, + &config, + &splicing_metadata, + "0.1.0", + "cargo 1.57.0 (b2e52d7ca 2021-10-21)", + "rustc 1.57.0 (f1edd0429 2021-11-29)", + ); + + assert_eq!( + digest, + Digest("4c8bc5de2d6d7acc7997ae9870e52bc0f0fcbc2b94076e61162078be6a69cc3b".to_owned()) + ); + } + + #[test] + fn digest_with_config() { + let context = Context::default(); + let config = Config { + generate_build_scripts: false, + annotations: BTreeMap::from([( + CrateId::new("rustonomicon".to_owned(), "1.0.0".to_owned()), + CrateAnnotations { + compile_data_glob: Some(BTreeSet::from(["arts/**".to_owned()])), + ..CrateAnnotations::default() + }, + )]), + cargo_config: None, + supported_platform_triples: BTreeSet::from([ + "aarch64-apple-darwin".to_owned(), + "aarch64-unknown-linux-gnu".to_owned(), + "wasm32-unknown-unknown".to_owned(), + "wasm32-wasi".to_owned(), + "x86_64-apple-darwin".to_owned(), + "x86_64-pc-windows-msvc".to_owned(), + "x86_64-unknown-freebsd".to_owned(), + "x86_64-unknown-linux-gnu".to_owned(), + ]), + ..Config::default() + }; + + let splicing_metadata = SplicingMetadata::default(); + + let digest = Digest::compute( + &context, + &config, + &splicing_metadata, + "0.1.0", + "cargo 1.57.0 (b2e52d7ca 2021-10-21)", + "rustc 1.57.0 (f1edd0429 2021-11-29)", + ); + + assert_eq!( + digest, + Digest("7a0d2f5fce05c4d433826b5c4748bec7b125b79182de598dc700e893e09077e9".to_owned()) + ); + } + + #[test] + fn digest_with_splicing_metadata() { + let context = Context::default(); + let config = Config::default(); + let splicing_metadata = SplicingMetadata { + direct_packages: BTreeMap::from([( + "rustonomicon".to_owned(), + cargo_toml::DependencyDetail { + version: Some("1.0.0".to_owned()), + ..cargo_toml::DependencyDetail::default() + }, + )]), + manifests: BTreeMap::new(), + cargo_config: None, + }; + + let digest = Digest::compute( + &context, + &config, + &splicing_metadata, + "0.1.0", + "cargo 1.57.0 (b2e52d7ca 2021-10-21)", + "rustc 1.57.0 (f1edd0429 2021-11-29)", + ); + + assert_eq!( + digest, + Digest("fb5d7854dae366d4a9ff135208c28f08c14c2608dd6c5aa1b35b6e677dd53c06".to_owned()) + ); + } + + #[test] + fn digest_with_cargo_config() { + let context = Context::default(); + let config = Config::default(); + let cargo_config = CargoConfig { + registries: BTreeMap::from([ + ( + "art-crates-remote".to_owned(), + AdditionalRegistry { + index: "https://artprod.mycompany/artifactory/git/cargo-remote.git" + .to_owned(), + token: None, + }, + ), + ( + "crates-io".to_owned(), + AdditionalRegistry { + index: "https://github.com/rust-lang/crates.io-index".to_owned(), + token: None, + }, + ), + ]), + registry: Registry { + default: "art-crates-remote".to_owned(), + token: None, + }, + source: BTreeMap::new(), + }; + + let splicing_metadata = SplicingMetadata { + cargo_config: Some(cargo_config), + ..SplicingMetadata::default() + }; + + let digest = Digest::compute( + &context, + &config, + &splicing_metadata, + "0.1.0", + "cargo 1.57.0 (b2e52d7ca 2021-10-21)", + "rustc 1.57.0 (f1edd0429 2021-11-29)", + ); + + assert_eq!( + digest, + Digest("2b32833e4265bce03df70dbb9c2b32a78879cc02fbe88a481e3fe4a17812aca9".to_owned()) + ); + } + + #[test] + fn detect_bazel_lockfile() { + let temp_dir = tempfile::tempdir().unwrap(); + let lockfile = temp_dir.as_ref().join("lockfile"); + fs::write( + &lockfile, + serde_json::to_string(&crate::context::Context::default()).unwrap(), + ) + .unwrap(); + + let kind = LockfileKind::detect(&lockfile).unwrap(); + assert!(matches!(kind, LockfileKind::Bazel)); + } + + #[test] + fn detect_cargo_lockfile() { + let temp_dir = tempfile::tempdir().unwrap(); + let lockfile = temp_dir.as_ref().join("lockfile"); + fs::write( + &lockfile, + textwrap::dedent( + r#" + version = 3 + + [[package]] + name = "detect" + version = "0.1.0" + "#, + ), + ) + .unwrap(); + + let kind = LockfileKind::detect(&lockfile).unwrap(); + assert!(matches!(kind, LockfileKind::Cargo)); + } + + #[test] + fn detect_invalid_lockfile() { + let temp_dir = tempfile::tempdir().unwrap(); + let lockfile = temp_dir.as_ref().join("lockfile"); + fs::write(&lockfile, "]} invalid {[").unwrap(); + + assert!(LockfileKind::detect(&lockfile).is_err()); + } + + #[test] + fn detect_missing_lockfile() { + let temp_dir = tempfile::tempdir().unwrap(); + let lockfile = temp_dir.as_ref().join("lockfile"); + assert!(LockfileKind::detect(&lockfile).is_err()); + } +} diff --git a/crate_universe/src/main.rs b/crate_universe/src/main.rs index 50fca89f4c..0a79db4cda 100644 --- a/crate_universe/src/main.rs +++ b/crate_universe/src/main.rs @@ -1,103 +1,15 @@ -use std::path::{Path, PathBuf}; +//! The `cargo->bazel` binary's entrypoint -use anyhow::{anyhow, Context}; -use crate_universe_resolver::{config::Config, renderer::Renderer}; -use indoc::indoc; -use log::*; -use structopt::StructOpt; +use cargo_bazel::cli; -// Options which don't affect the contents of the generated should be on this struct. -// These fields are not factored into cache keys. -// -// Anything which affects the contents of the generated output should live on `config::Config`. -#[derive(StructOpt)] -struct Opt { - #[structopt(long)] - repo_name: String, - #[structopt(long = "input_path", parse(from_os_str))] - input_path: PathBuf, - #[structopt(long = "repository_dir", parse(from_os_str))] - repository_dir: PathBuf, - #[structopt(long = "lockfile", parse(from_os_str))] - lockfile: Option, - #[structopt(long = "update-lockfile")] - update_lockfile: bool, -} - -fn main() -> anyhow::Result<()> { - env_logger::init(); - - let opt = Opt::from_args(); - trace!("Parsing config from {:?}", opt.input_path); +fn main() -> cli::Result<()> { + // Parse arguments + let opt = cli::parse_args(); - let config: Config = { - let config_file = std::fs::File::open(&opt.input_path) - .with_context(|| format!("Failed to open config file at {:?}", opt.input_path))?; - serde_json::from_reader(config_file) - .with_context(|| format!("Failed to parse config file {:?}", opt.input_path))? - }; - - let lockfile = &opt.lockfile; - if opt.update_lockfile { - if lockfile.is_none() { - eprintln!("Not updating lockfile for `crate_universe` repository with name \"{}\" because it has no `lockfile` attribute.", opt.repo_name); - } - } else if let Some(lockfile) = lockfile { - return reuse_lockfile(config, lockfile, &opt); + match opt { + cli::Options::Generate(opt) => cli::generate(opt), + cli::Options::Splice(opt) => cli::splice(opt), + cli::Options::Query(opt) => cli::query(opt), + cli::Options::Vendor(opt) => cli::vendor(opt), } - - generate_dependencies(config, &opt) -} - -fn reuse_lockfile(config: Config, lockfile: &Path, opt: &Opt) -> anyhow::Result<()> { - trace!("Preprocessing config"); - let repository_name = config.repository_name.clone(); - - let mut resolver = config.preprocess()?; - - let renderer = Renderer::new_from_lockfile(lockfile)?; - - // TODO: Add lockfile versioning and check that here - - if !renderer.matches_digest(&resolver.digest()?) { - return Err(anyhow!( - indoc! { r#" - "rules_rust_external: Lockfile at {} is out of date, please either: - 1. Re-run bazel with the environment variable `RULES_RUST_REPIN=true`, to update the lockfile. - 2. Remove the `lockfile` attribute from the `crate_universe` repository rule with name `{}` to use floating dependency versions. - "# }, - lockfile.display(), - repository_name, - )); - } - - renderer.render(&opt.repository_dir) -} - -fn generate_dependencies(config: Config, opt: &Opt) -> anyhow::Result<()> { - trace!("Preprocessing config"); - let resolver = config.preprocess()?; - - // This will contain the mapping of the workspace member (i.e. toplevel) packages' direct - // dependencies package names to their package Bazel repository name (e.g. `bzip2 -> - // bzip2__0_3_3`), allowing the user to easily express dependencies with a `package()` macro - // without knowing the version in advance. - trace!("Resolving transitive dependencies"); - let consolidator = resolver.resolve()?; - trace!("Consolidating overrides"); - let renderer = consolidator.consolidate()?; - - renderer.render(&opt.repository_dir)?; - - let lockfile = &opt.lockfile; - - if opt.update_lockfile { - if let Some(lockfile) = lockfile.as_ref() { - renderer - .render_lockfile(lockfile) - .context("Failed to update lockfile")?; - } - } - - Ok(()) } diff --git a/crate_universe/src/metadata.rs b/crate_universe/src/metadata.rs new file mode 100644 index 0000000000..0e48676698 --- /dev/null +++ b/crate_universe/src/metadata.rs @@ -0,0 +1,241 @@ +//! Tools for gathering various kinds of metadata (Cargo.lock, Cargo metadata, Crate Index info). + +mod dependency; +mod metadata_annotation; + +use std::env; +use std::fs; +use std::path::{Path, PathBuf}; +use std::process::Command; + +use anyhow::{bail, Context, Result}; +use cargo_lock::Lockfile as CargoLockfile; +use cargo_metadata::{Metadata as CargoMetadata, MetadataCommand}; + +pub use self::dependency::*; +pub use self::metadata_annotation::*; + +// TODO: This should also return a set of [crate-index::IndexConfig]s for packages in metadata.packages +/// A Trait for generating metadata (`cargo metadata` output and a lock file) from a Cargo manifest. +pub trait MetadataGenerator { + fn generate>(&self, manifest_path: T) -> Result<(CargoMetadata, CargoLockfile)>; +} + +/// Generates Cargo metadata and a lockfile from a provided manifest. +pub struct Generator { + /// The path to a `cargo` binary + cargo_bin: PathBuf, + + /// The path to a `rustc` binary + rustc_bin: PathBuf, +} + +impl Generator { + pub fn new() -> Self { + Generator { + cargo_bin: PathBuf::from(env::var("CARGO").unwrap_or_else(|_| "cargo".to_string())), + rustc_bin: PathBuf::from(env::var("RUSTC").unwrap_or_else(|_| "rustc".to_string())), + } + } + + pub fn with_cargo(mut self, cargo_bin: PathBuf) -> Self { + self.cargo_bin = cargo_bin; + self + } + + pub fn with_rustc(mut self, rustc_bin: PathBuf) -> Self { + self.rustc_bin = rustc_bin; + self + } +} + +impl MetadataGenerator for Generator { + fn generate>(&self, manifest_path: T) -> Result<(CargoMetadata, CargoLockfile)> { + let manifest_dir = manifest_path + .as_ref() + .parent() + .expect("The manifest should have a parent directory"); + let lockfile = { + let lock_path = manifest_dir.join("Cargo.lock"); + if !lock_path.exists() { + bail!("No `Cargo.lock` file was found with the given manifest") + } + cargo_lock::Lockfile::load(lock_path)? + }; + + let metadata = MetadataCommand::new() + .cargo_path(&self.cargo_bin) + .current_dir(manifest_dir) + .manifest_path(manifest_path.as_ref()) + .other_options(["--locked".to_owned()]) + .exec()?; + + Ok((metadata, lockfile)) + } +} + +pub struct LockGenerator { + /// The path to a `cargo` binary + cargo_bin: PathBuf, + + /// The path to a `rustc` binary + rustc_bin: PathBuf, +} + +impl LockGenerator { + pub fn new(cargo_bin: PathBuf, rustc_bin: PathBuf) -> Self { + Self { + cargo_bin, + rustc_bin, + } + } + + pub fn generate( + &self, + manifest_path: &Path, + existing_lock: &Option, + ) -> Result { + let manifest_dir = manifest_path.parent().unwrap(); + let generated_lockfile_path = manifest_dir.join("Cargo.lock"); + + let output = if let Some(lock) = existing_lock { + if !lock.exists() { + bail!( + "An existing lockfile path was provided but a file at '{}' does not exist", + lock.display() + ) + } + + // Install the file into the target location + if generated_lockfile_path.exists() { + fs::remove_file(&generated_lockfile_path)?; + } + fs::copy(&lock, &generated_lockfile_path)?; + + // Ensure the Cargo cache is up to date to simulate the behavior + // of having just generated a new one + Command::new(&self.cargo_bin) + // Cargo detects config files based on `pwd` when running so + // to ensure user provided Cargo config files are used, it's + // critical to set the working directory to the manifest dir. + .current_dir(manifest_dir) + .arg("fetch") + .arg("--locked") + .arg("--manifest-path") + .arg(manifest_path) + .env("RUSTC", &self.rustc_bin) + .output() + .context(format!( + "Error running cargo to fetch crates '{}'", + manifest_path.display() + ))? + } else { + // Simply invoke `cargo generate-lockfile` + Command::new(&self.cargo_bin) + // Cargo detects config files based on `pwd` when running so + // to ensure user provided Cargo config files are used, it's + // critical to set the working directory to the manifest dir. + .current_dir(manifest_dir) + .arg("generate-lockfile") + .arg("--manifest-path") + .arg(manifest_path) + .env("RUSTC", &self.rustc_bin) + .output() + .context(format!( + "Error running cargo to generate lockfile '{}'", + manifest_path.display() + ))? + }; + + if !output.status.success() { + eprintln!("{}", String::from_utf8_lossy(&output.stdout)); + eprintln!("{}", String::from_utf8_lossy(&output.stderr)); + bail!(format!("Failed to generate lockfile: {}", output.status)) + } + + cargo_lock::Lockfile::load(&generated_lockfile_path).context(format!( + "Failed to load lockfile: {}", + generated_lockfile_path.display() + )) + } +} + +/// A generator which runs `cargo vendor` on a given manifest +pub struct VendorGenerator { + /// The path to a `cargo` binary + cargo_bin: PathBuf, + + /// The path to a `rustc` binary + rustc_bin: PathBuf, +} + +impl VendorGenerator { + pub fn new(cargo_bin: PathBuf, rustc_bin: PathBuf) -> Self { + Self { + cargo_bin, + rustc_bin, + } + } + + pub fn generate(&self, manifest_path: &Path, output_dir: &Path) -> Result<()> { + let manifest_dir = manifest_path.parent().unwrap(); + + // Simply invoke `cargo generate-lockfile` + let output = Command::new(&self.cargo_bin) + // Cargo detects config files based on `pwd` when running so + // to ensure user provided Cargo config files are used, it's + // critical to set the working directory to the manifest dir. + .current_dir(manifest_dir) + .arg("vendor") + .arg("--manifest-path") + .arg(manifest_path) + .arg("--locked") + .arg("--versioned-dirs") + .arg(output_dir) + .env("RUSTC", &self.rustc_bin) + .output() + .with_context(|| { + format!( + "Error running cargo to vendor sources for manifest '{}'", + manifest_path.display() + ) + })?; + + if !output.status.success() { + eprintln!("{}", String::from_utf8_lossy(&output.stdout)); + eprintln!("{}", String::from_utf8_lossy(&output.stderr)); + bail!(format!("Failed to vendor sources with: {}", output.status)) + } + + Ok(()) + } +} + +/// A helper function for writing Cargo metadata to a file. +pub fn write_metadata(path: &Path, metadata: &cargo_metadata::Metadata) -> Result<()> { + let content = + serde_json::to_string_pretty(metadata).context("Failed to serialize Cargo Metadata")?; + + fs::write(path, content).context("Failed to write metadata to disk") +} + +/// A helper function for deserializing Cargo metadata and lockfiles +pub fn load_metadata( + metadata_path: &Path, + lockfile_path: Option<&Path>, +) -> Result<(cargo_metadata::Metadata, cargo_lock::Lockfile)> { + let content = fs::read_to_string(metadata_path) + .with_context(|| format!("Failed to load Cargo Metadata: {}", metadata_path.display()))?; + + let metadata = + serde_json::from_str(&content).context("Unable to deserialize Cargo metadata")?; + + let lockfile_path = lockfile_path + .map(PathBuf::from) + .unwrap_or_else(|| metadata_path.parent().unwrap().join("Cargo.lock")); + + let lockfile = cargo_lock::Lockfile::load(&lockfile_path) + .with_context(|| format!("Failed to load lockfile: {}", lockfile_path.display()))?; + + Ok((metadata, lockfile)) +} diff --git a/crate_universe/src/metadata/dependency.rs b/crate_universe/src/metadata/dependency.rs new file mode 100644 index 0000000000..105e4fea4a --- /dev/null +++ b/crate_universe/src/metadata/dependency.rs @@ -0,0 +1,363 @@ +///! Gathering dependencies is the largest part of annotating. +use cargo_metadata::{Metadata as CargoMetadata, Node, NodeDep, Package, PackageId}; +use serde::{Deserialize, Serialize}; + +use crate::utils::sanitize_module_name; +use crate::utils::starlark::{Select, SelectList}; + +/// A representation of a crate dependency +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Clone)] +pub struct Dependency { + /// The PackageId of the target + pub package_id: PackageId, + + /// The library target name of the dependency. + pub target_name: String, + + /// The alias for the dependency from the perspective of the current package + pub alias: Option, +} + +/// A collection of [Dependency]s sorted by dependency kind. +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct DependencySet { + pub normal_deps: SelectList, + pub normal_dev_deps: SelectList, + pub proc_macro_deps: SelectList, + pub proc_macro_dev_deps: SelectList, + pub build_deps: SelectList, + pub build_proc_macro_deps: SelectList, +} + +impl DependencySet { + /// Collect all dependencies for a given node in the resolve graph. + pub fn new_for_node(node: &Node, metadata: &CargoMetadata) -> Self { + let (normal_dev_deps, normal_deps) = { + let (dev, normal) = node + .deps + .iter() + // Do not track workspace members as dependencies. Users are expected to maintain those connections + .filter(|dep| !is_workspace_member(dep, metadata)) + .filter(|dep| is_lib_package(&metadata[&dep.pkg])) + .filter(|dep| is_normal_dependency(dep) || is_dev_dependency(dep)) + .partition(|dep| is_dev_dependency(dep)); + + ( + collect_deps_selectable(dev, metadata), + collect_deps_selectable(normal, metadata), + ) + }; + + let (proc_macro_dev_deps, proc_macro_deps) = { + let (dev, normal) = node + .deps + .iter() + // Do not track workspace members as dependencies. Users are expected to maintain those connections + .filter(|dep| !is_workspace_member(dep, metadata)) + .filter(|dep| is_proc_macro_package(&metadata[&dep.pkg])) + .filter(|dep| !is_build_dependency(dep)) + .partition(|dep| is_dev_dependency(dep)); + + ( + collect_deps_selectable(dev, metadata), + collect_deps_selectable(normal, metadata), + ) + }; + + let (build_proc_macro_deps, mut build_deps) = { + let (proc_macro, normal) = node + .deps + .iter() + // Do not track workspace members as dependencies. Users are expected to maintain those connections + .filter(|dep| !is_workspace_member(dep, metadata)) + .filter(|dep| is_build_dependency(dep)) + .filter(|dep| !is_dev_dependency(dep)) + .partition(|dep| is_proc_macro_package(&metadata[&dep.pkg])); + + ( + collect_deps_selectable(proc_macro, metadata), + collect_deps_selectable(normal, metadata), + ) + }; + + // `*-sys` packages follow slightly different rules than other dependencies. These + // packages seem to provide some environment variables required to build the top level + // package and are expected to be avialable to other build scripts. If a target depends + // on a `*-sys` crate for itself, so would it's build script. Hopefully this is correct. + // https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key + // https://doc.rust-lang.org/cargo/reference/build-scripts.html#-sys-packages + let sys_name = format!("{}-sys", &metadata[&node.id].name); + normal_deps.configurations().into_iter().for_each(|config| { + normal_deps + .get_iter(config) + // Iterating over known key should be safe + .unwrap() + // Add any normal dependency to build dependencies that are associated `*-sys` crates + .for_each(|dep| { + let dep_pkg_name = &metadata[&dep.package_id].name; + if *dep_pkg_name == sys_name { + build_deps.insert(dep.clone(), config.cloned()) + } + }); + }); + + Self { + normal_deps, + normal_dev_deps, + proc_macro_deps, + proc_macro_dev_deps, + build_deps, + build_proc_macro_deps, + } + } +} + +fn collect_deps_selectable( + deps: Vec<&NodeDep>, + metadata: &cargo_metadata::Metadata, +) -> SelectList { + let mut selectable = SelectList::default(); + + for dep in deps.into_iter() { + let dep_pkg = &metadata[&dep.pkg]; + let target_name = get_library_target_name(dep_pkg, &dep.name); + let alias = get_target_alias(&dep.name, dep_pkg); + + for kind_info in &dep.dep_kinds { + selectable.insert( + Dependency { + package_id: dep.pkg.clone(), + target_name: target_name.clone(), + alias: alias.clone(), + }, + kind_info + .target + .as_ref() + .map(|platform| platform.to_string()), + ); + } + } + + selectable +} + +fn is_lib_package(package: &Package) -> bool { + package.targets.iter().any(|target| { + target + .crate_types + .iter() + .any(|t| ["lib", "rlib"].contains(&t.as_str())) + }) +} + +fn is_proc_macro_package(package: &Package) -> bool { + package + .targets + .iter() + .any(|target| target.crate_types.iter().any(|t| t == "proc-macro")) +} + +fn is_dev_dependency(node_dep: &NodeDep) -> bool { + let is_normal_dep = is_normal_dependency(node_dep); + let is_dev_dep = node_dep + .dep_kinds + .iter() + .any(|k| matches!(k.kind, cargo_metadata::DependencyKind::Development)); + + // In the event that a dependency is listed as both a dev and normal dependency, + // it's only considered a dev dependency if it's __not__ a normal dependency. + !is_normal_dep && is_dev_dep +} + +fn is_build_dependency(node_dep: &NodeDep) -> bool { + node_dep + .dep_kinds + .iter() + .any(|k| matches!(k.kind, cargo_metadata::DependencyKind::Build)) +} + +fn is_normal_dependency(node_dep: &NodeDep) -> bool { + node_dep + .dep_kinds + .iter() + .any(|k| matches!(k.kind, cargo_metadata::DependencyKind::Normal)) +} + +fn is_workspace_member(node_dep: &NodeDep, metadata: &CargoMetadata) -> bool { + metadata + .workspace_members + .iter() + .any(|id| id == &node_dep.pkg) +} + +fn get_library_target_name(package: &Package, potential_name: &str) -> String { + // If the potential name is not an alias in a dependent's package, a target's name + // should match which means we already know what the target library name is. + if package.targets.iter().any(|t| t.name == potential_name) { + return potential_name.to_string(); + } + + // Locate any library type targets + let lib_targets: Vec<&cargo_metadata::Target> = package + .targets + .iter() + .filter(|t| t.kind.iter().any(|k| k == "lib" || k == "proc-macro")) + .collect(); + + // Only one target should be found + assert_eq!(lib_targets.len(), 1); + + let target = lib_targets.into_iter().last().unwrap(); + target.name.clone() +} + +/// The resolve graph (resolve.nodes[#].deps[#].name) of Cargo metadata uses module names +/// for targets where packages (packages[#].targets[#].name) uses crate names. In order to +/// determine whether or not a dependency is aliased, we compare it with all available targets +/// on it's package. Note that target names are not guaranteed to be module names where Node +/// dependnecies are, so we need to do a conversion to check for this +fn get_target_alias(target_name: &str, package: &Package) -> Option { + match package + .targets + .iter() + .all(|t| sanitize_module_name(&t.name) != target_name) + { + true => Some(target_name.to_string()), + false => None, + } +} + +#[cfg(test)] +mod test { + use std::collections::BTreeSet; + + use super::*; + + use crate::test::*; + + /// Locate the [cargo_metadata::Node] for the crate matching the given name + fn find_metadata_node<'a>( + name: &str, + metadata: &'a cargo_metadata::Metadata, + ) -> &'a cargo_metadata::Node { + metadata + .resolve + .as_ref() + .unwrap() + .nodes + .iter() + .find(|node| { + let pkg = &metadata[&node.id]; + pkg.name == name + }) + .unwrap() + } + + #[test] + fn sys_dependencies() { + let metadata = metadata::build_scripts(); + + let openssl_node = find_metadata_node("openssl", &metadata); + + let dependencies = DependencySet::new_for_node(openssl_node, &metadata); + + let sys_crate = dependencies + .normal_deps + .get_iter(None) + .unwrap() + .find(|dep| { + let pkg = &metadata[&dep.package_id]; + pkg.name == "openssl-sys" + }); + + // sys crates like `openssl-sys` should always be dependencies of any + // crate which matches it's name minus the `-sys` suffix + assert!(sys_crate.is_some()); + } + + #[test] + fn tracked_aliases() { + let metadata = metadata::alias(); + + let aliases_node = find_metadata_node("aliases", &metadata); + let dependencies = DependencySet::new_for_node(aliases_node, &metadata); + + let aliases: Vec<&Dependency> = dependencies + .normal_deps + .get_iter(None) + .unwrap() + .filter(|dep| dep.alias.is_some()) + .collect(); + + assert_eq!(aliases.len(), 2); + + let expected: BTreeSet = aliases + .into_iter() + .map(|dep| dep.alias.as_ref().unwrap().clone()) + .collect(); + + assert_eq!( + expected, + BTreeSet::from(["pinned_log".to_owned(), "pinned_names".to_owned()]) + ); + } + + #[test] + fn matched_rlib() { + let metadata = metadata::crate_types(); + + let node = find_metadata_node("crate-types", &metadata); + let dependencies = DependencySet::new_for_node(node, &metadata); + + let rlib_deps: Vec<&Dependency> = dependencies + .normal_deps + .get_iter(None) + .unwrap() + .filter(|dep| { + let pkg = &metadata[&dep.package_id]; + pkg.targets + .iter() + .any(|t| t.crate_types.contains(&"rlib".to_owned())) + }) + .collect(); + + // Currently the only expected __explicitly__ "rlib" target in this metadata is `sysinfo`. + assert_eq!(rlib_deps.len(), 1); + + let sysinfo_dep = rlib_deps.iter().last().unwrap(); + assert_eq!(sysinfo_dep.target_name, "sysinfo"); + } + + #[test] + fn multiple_dep_kinds() { + let metadata = metadata::multi_cfg_dep(); + + let node = find_metadata_node("cpufeatures", &metadata); + let dependencies = DependencySet::new_for_node(node, &metadata); + + let libc_cfgs: Vec> = dependencies + .normal_deps + .configurations() + .into_iter() + .flat_map(|conf| { + dependencies + .normal_deps + .get_iter(conf) + .expect("Iterating over known keys should never panic") + .filter(|dep| dep.target_name == "libc") + .map(move |_| conf.cloned()) + }) + .collect(); + + assert_eq!(libc_cfgs.len(), 2); + + let cfg_strs: BTreeSet = libc_cfgs.into_iter().flatten().collect(); + assert_eq!( + cfg_strs, + BTreeSet::from([ + "aarch64-apple-darwin".to_owned(), + "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))".to_owned(), + ]) + ); + } +} diff --git a/crate_universe/src/metadata/metadata_annotation.rs b/crate_universe/src/metadata/metadata_annotation.rs new file mode 100644 index 0000000000..be4cb7f3be --- /dev/null +++ b/crate_universe/src/metadata/metadata_annotation.rs @@ -0,0 +1,555 @@ +//! Collect and store information from Cargo metadata specific to Bazel's needs + +use std::collections::{BTreeMap, BTreeSet}; +use std::convert::TryFrom; +use std::path::PathBuf; + +use anyhow::{bail, Result}; +use cargo_metadata::{Node, Package, PackageId}; +use hex::ToHex; +use serde::{Deserialize, Serialize}; + +use crate::config::{Commitish, Config, CrateAnnotations, CrateId}; +use crate::metadata::dependency::DependencySet; +use crate::splicing::{SourceInfo, WorkspaceMetadata}; + +pub type CargoMetadata = cargo_metadata::Metadata; +pub type CargoLockfile = cargo_lock::Lockfile; + +/// Additional information about a crate relative to other crates in a dependency graph. +#[derive(Debug, Serialize, Deserialize)] +pub struct CrateAnnotation { + /// The crate's node in the Cargo "resolve" graph. + pub node: Node, + + /// The crate's sorted dependencies. + pub deps: DependencySet, +} + +/// Additional information about a Cargo workspace's metadata. +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct MetadataAnnotation { + /// All packages found within the Cargo metadata + pub packages: BTreeMap, + + /// All [CrateAnnotation]s for all packages + pub crates: BTreeMap, + + /// All packages that are workspace members + pub workspace_members: BTreeSet, + + /// The path to the directory containing the Cargo workspace that produced the metadata. + pub workspace_root: PathBuf, + + /// Information on the Cargo workspace. + pub workspace_metadata: WorkspaceMetadata, +} + +impl MetadataAnnotation { + pub fn new(metadata: CargoMetadata) -> MetadataAnnotation { + // UNWRAP: The workspace metadata should be written by a controlled process. This should not return a result + let workspace_metadata = find_workspace_metadata(&metadata).unwrap_or_default(); + + let resolve = metadata + .resolve + .as_ref() + .expect("The metadata provided requires a resolve graph") + .clone(); + + let is_node_workspace_member = |node: &Node, metadata: &CargoMetadata| -> bool { + metadata.workspace_members.iter().any(|pkg| pkg == &node.id) + }; + + let workspace_members: BTreeSet = resolve + .nodes + .iter() + .filter(|node| is_node_workspace_member(node, &metadata)) + .map(|node| node.id.clone()) + .collect(); + + let crates = resolve + .nodes + .iter() + .map(|node| { + ( + node.id.clone(), + Self::annotate_crate(node.clone(), &metadata), + ) + }) + .collect(); + + let packages = metadata + .packages + .into_iter() + .map(|pkg| (pkg.id.clone(), pkg)) + .collect(); + + MetadataAnnotation { + packages, + crates, + workspace_members, + workspace_root: PathBuf::from(metadata.workspace_root.as_std_path()), + workspace_metadata, + } + } + + fn annotate_crate(node: Node, metadata: &CargoMetadata) -> CrateAnnotation { + // Gather all dependencies + let deps = DependencySet::new_for_node(&node, metadata); + + CrateAnnotation { node, deps } + } +} + +/// Additional information about how and where to acquire a crate's source code from. +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] +pub enum SourceAnnotation { + Git { + /// The Git url where to clone the source from. + remote: String, + + /// The revision information for the git repository. This is used for + /// [git_repository::commit](https://docs.bazel.build/versions/main/repo/git.html#git_repository-commit), + /// [git_repository::tag](https://docs.bazel.build/versions/main/repo/git.html#git_repository-tag), or + /// [git_repository::branch](https://docs.bazel.build/versions/main/repo/git.html#git_repository-branch). + commitish: Commitish, + + /// See [git_repository::shallow_since](https://docs.bazel.build/versions/main/repo/git.html#git_repository-shallow_since) + #[serde(default, skip_serializing_if = "Option::is_none")] + shallow_since: Option, + + /// See [git_repository::strip_prefix](https://docs.bazel.build/versions/main/repo/git.html#git_repository-strip_prefix) + #[serde(default, skip_serializing_if = "Option::is_none")] + strip_prefix: Option, + + /// See [git_repository::patch_args](https://docs.bazel.build/versions/main/repo/git.html#git_repository-patch_args) + #[serde(default, skip_serializing_if = "Option::is_none")] + patch_args: Option>, + + /// See [git_repository::patch_tool](https://docs.bazel.build/versions/main/repo/git.html#git_repository-patch_tool) + #[serde(default, skip_serializing_if = "Option::is_none")] + patch_tool: Option, + + /// See [git_repository::patches](https://docs.bazel.build/versions/main/repo/git.html#git_repository-patches) + #[serde(default, skip_serializing_if = "Option::is_none")] + patches: Option>, + }, + Http { + /// See [http_archive::url](https://docs.bazel.build/versions/main/repo/http.html#http_archive-url) + url: String, + + /// See [http_archive::sha256](https://docs.bazel.build/versions/main/repo/http.html#http_archive-sha256) + #[serde(default, skip_serializing_if = "Option::is_none")] + sha256: Option, + + /// See [http_archive::patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args) + #[serde(default, skip_serializing_if = "Option::is_none")] + patch_args: Option>, + + /// See [http_archive::patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool) + #[serde(default, skip_serializing_if = "Option::is_none")] + patch_tool: Option, + + /// See [http_archive::patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches) + #[serde(default, skip_serializing_if = "Option::is_none")] + patches: Option>, + }, +} + +/// TODO +#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] +pub struct LockfileAnnotation { + /// TODO + pub crates: BTreeMap, +} + +impl LockfileAnnotation { + pub fn new(lockfile: CargoLockfile, metadata: &CargoMetadata) -> Result { + let workspace_metadata = find_workspace_metadata(metadata).unwrap_or_default(); + + let nodes: Vec<&Node> = metadata + .resolve + .as_ref() + .expect("Metadata is expected to have a resolve graph") + .nodes + .iter() + .filter(|node| !is_workspace_member(&node.id, metadata)) + .collect(); + + // Produce source annotations for each crate in the resolve graph + let crates = nodes + .iter() + .map(|node| { + Ok(( + node.id.clone(), + Self::collect_source_annotations( + node, + metadata, + &lockfile, + &workspace_metadata, + )?, + )) + }) + .collect::>>()?; + + Ok(Self { crates }) + } + + /// Resolve all URLs and checksum-like data for each package + fn collect_source_annotations( + node: &Node, + metadata: &CargoMetadata, + lockfile: &CargoLockfile, + workspace_metadata: &WorkspaceMetadata, + ) -> Result { + let pkg = &metadata[&node.id]; + + // Locate the matching lock package for the current crate + let lock_pkg = match cargo_meta_pkg_to_locked_pkg(pkg, &lockfile.packages) { + Some(lock_pkg) => lock_pkg, + None => bail!( + "Could not find lockfile entry matching metadata package '{}'", + pkg.name + ), + }; + + // Check for spliced information about a crate's network source. + let spliced_source_info = Self::find_source_annotation(lock_pkg, workspace_metadata); + + // Parse it's source info. The check above should prevent a panic + let source = match lock_pkg.source.as_ref() { + Some(source) => source, + None => match spliced_source_info { + Some(info) => { + return Ok(SourceAnnotation::Http { + url: info.url, + sha256: Some(info.sha256), + patch_args: None, + patch_tool: None, + patches: None, + }) + } + None => bail!( + "The package '{:?} {:?}' has no source info so no annotation can be made", + lock_pkg.name, + lock_pkg.version + ), + }, + }; + + // Handle any git repositories + if let Some(git_ref) = source.git_reference() { + let strip_prefix = Self::extract_git_strip_prefix(pkg)?; + + return Ok(SourceAnnotation::Git { + remote: source.url().to_string(), + commitish: Commitish::from(git_ref.clone()), + shallow_since: None, + strip_prefix, + patch_args: None, + patch_tool: None, + patches: None, + }); + } + + // One of the last things that should be checked is the spliced source information as + // other sources may more accurately represent where a crate should be downloaded. + if let Some(info) = spliced_source_info { + return Ok(SourceAnnotation::Http { + url: info.url, + sha256: Some(info.sha256), + patch_args: None, + patch_tool: None, + patches: None, + }); + } + + // Finally, In the event that no spliced source information was included in the + // metadata the raw source info is used for registry crates and `crates.io` is + // assumed to be the source. + if source.is_registry() { + return Ok(SourceAnnotation::Http { + url: format!( + "https://crates.io/api/v1/crates/{}/{}/download", + lock_pkg.name, lock_pkg.version, + ), + sha256: lock_pkg + .checksum + .as_ref() + .and_then(|sum| { + if sum.is_sha256() { + sum.as_sha256() + } else { + None + } + }) + .map(|sum| sum.encode_hex::()), + patch_args: None, + patch_tool: None, + patches: None, + }); + } + + bail!( + "Unable to determine source annotation for '{:?} {:?}", + lock_pkg.name, + lock_pkg.version + ) + } + + fn find_source_annotation( + package: &cargo_lock::Package, + metadata: &WorkspaceMetadata, + ) -> Option { + let crate_id = CrateId::new(package.name.to_string(), package.version.to_string()); + metadata.sources.get(&crate_id).cloned() + } + + fn extract_git_strip_prefix(pkg: &Package) -> Result> { + // {CARGO_HOME}/git/checkouts/name-hash/short-sha/[strip_prefix...]/Cargo.toml + let components = pkg + .manifest_path + .components() + .map(|v| v.to_string()) + .collect::>(); + for (i, _) in components.iter().enumerate() { + let possible_components = &components[i..]; + if possible_components.len() < 5 { + continue; + } + if possible_components[0] != "git" + || possible_components[1] != "checkouts" + || possible_components[possible_components.len() - 1] != "Cargo.toml" + { + continue; + } + if possible_components.len() == 5 { + return Ok(None); + } + return Ok(Some( + possible_components[4..(possible_components.len() - 1)].join("/"), + )); + } + bail!("Expected git package to have a manifest path of pattern {{CARGO_HOME}}/git/checkouts/[name]-[hash]/[short-sha]/.../Cargo.toml but {:?} had manifest path {}", pkg.id, pkg.manifest_path); + } +} + +/// A pairring of a crate's package identifier to it's annotations. +#[derive(Debug, Serialize, Deserialize)] +pub struct PairredExtras { + /// The crate's package identifier + pub package_id: cargo_metadata::PackageId, + + /// The crate's annotations + pub crate_extra: CrateAnnotations, +} + +/// A collection of data which has been processed for optimal use in generating Bazel targets. +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct Annotations { + /// Annotated Cargo metadata + pub metadata: MetadataAnnotation, + + /// Annotated Cargo lockfile + pub lockfile: LockfileAnnotation, + + /// The current workspace's configuration settings + pub config: Config, + + /// Pairred crate annotations + pub pairred_extras: BTreeMap, +} + +impl Annotations { + pub fn new( + cargo_metadata: CargoMetadata, + cargo_lockfile: CargoLockfile, + config: Config, + ) -> Result { + let lockfile_annotation = LockfileAnnotation::new(cargo_lockfile, &cargo_metadata)?; + + // Annotate the cargo metadata + let metadata_annotation = MetadataAnnotation::new(cargo_metadata); + + let mut unused_extra_annotations = config.annotations.clone(); + + // Ensure each override matches a particular package + let pairred_extras = metadata_annotation + .packages + .iter() + .filter_map(|(pkg_id, pkg)| { + let extras: Vec = config + .annotations + .iter() + .filter(|(id, _)| id.matches(pkg)) + .map(|(id, extra)| { + // Mark that an annotation has been consumed + unused_extra_annotations.remove(id); + + // Fitler out the annotation + extra + }) + .cloned() + .collect(); + + if !extras.is_empty() { + Some(( + CrateId::new(pkg.name.clone(), pkg.version.to_string()), + PairredExtras { + package_id: pkg_id.clone(), + crate_extra: extras.into_iter().sum(), + }, + )) + } else { + None + } + }) + .collect(); + + // Alert on any unused annotations + if !unused_extra_annotations.is_empty() { + bail!( + "Unused annotations were provided. Please remove them: {:?}", + unused_extra_annotations.keys() + ); + } + + // Annotate metadata + Ok(Annotations { + metadata: metadata_annotation, + lockfile: lockfile_annotation, + config, + pairred_extras, + }) + } +} + +fn find_workspace_metadata(cargo_metadata: &CargoMetadata) -> Option { + WorkspaceMetadata::try_from(cargo_metadata.workspace_metadata.clone()).ok() +} + +/// Determines whether or not a package is a workspace member. This follows +/// the Cargo definition of a workspace memeber with one exception where +/// "extra workspace members" are *not* treated as workspace members +fn is_workspace_member(id: &PackageId, cargo_metadata: &CargoMetadata) -> bool { + if cargo_metadata.workspace_members.contains(id) { + if let Some(data) = find_workspace_metadata(cargo_metadata) { + let pkg = &cargo_metadata[id]; + let crate_id = CrateId::new(pkg.name.clone(), pkg.version.to_string()); + + !data.sources.contains_key(&crate_id) + } else { + true + } + } else { + false + } +} + +/// Match a [cargo_metadata::Package] to a [cargo_lock::Package]. +fn cargo_meta_pkg_to_locked_pkg<'a>( + pkg: &Package, + lock_packages: &'a [cargo_lock::Package], +) -> Option<&'a cargo_lock::Package> { + lock_packages + .iter() + .find(|lock_pkg| lock_pkg.name.as_str() == pkg.name && lock_pkg.version == pkg.version) +} + +#[cfg(test)] +mod test { + use super::*; + + use crate::test::*; + + #[test] + fn test_cargo_meta_pkg_to_locked_pkg() { + let pkg = mock_cargo_metadata_package(); + let lock_pkg = mock_cargo_lock_package(); + + assert!(cargo_meta_pkg_to_locked_pkg(&pkg, &vec![lock_pkg]).is_some()) + } + + #[test] + fn annotate_metadata_with_aliases() { + let annotations = MetadataAnnotation::new(test::metadata::alias()); + let log_crates: BTreeMap<&PackageId, &CrateAnnotation> = annotations + .crates + .iter() + .filter(|(id, _)| { + let pkg = &annotations.packages[*id]; + pkg.name == "log" + }) + .collect(); + + assert_eq!(log_crates.len(), 2); + } + + #[test] + fn annotate_lockfile_with_aliases() { + LockfileAnnotation::new(test::lockfile::alias(), &test::metadata::alias()).unwrap(); + } + + #[test] + fn annotate_metadata_with_build_scripts() { + MetadataAnnotation::new(test::metadata::build_scripts()); + } + + #[test] + fn annotate_lockfile_with_build_scripts() { + LockfileAnnotation::new( + test::lockfile::build_scripts(), + &test::metadata::build_scripts(), + ) + .unwrap(); + } + + #[test] + fn annotate_metadata_with_no_deps() {} + + #[test] + fn annotate_lockfile_with_no_deps() { + LockfileAnnotation::new(test::lockfile::no_deps(), &test::metadata::no_deps()).unwrap(); + } + + #[test] + fn detects_strip_prefix_for_git_repo() { + let crates = + LockfileAnnotation::new(test::lockfile::git_repos(), &test::metadata::git_repos()) + .unwrap() + .crates; + let tracing_core = crates + .iter() + .find(|(k, _)| k.repr.starts_with("tracing-core ")) + .map(|(_, v)| v) + .unwrap(); + match tracing_core { + SourceAnnotation::Git { + strip_prefix: Some(strip_prefix), + .. + } if strip_prefix == "tracing-core" => { + // Matched correctly. + } + other => { + panic!("Wanted SourceAnnotation::Git with strip_prefix == Some(\"tracing-core\"), got: {:?}", other); + } + } + } + + #[test] + fn detect_unused_annotation() { + // Create a config with some random annotation + let mut config = Config::default(); + config.annotations.insert( + CrateId::new("mock-crate".to_owned(), "0.1.0".to_owned()), + CrateAnnotations::default(), + ); + + let result = Annotations::new(test::metadata::no_deps(), test::lockfile::no_deps(), config); + assert!(result.is_err()); + + let result_str = format!("{:?}", result); + assert!(result_str.contains("Unused annotations were provided. Please remove them")); + assert!(result_str.contains("mock-crate")); + } +} diff --git a/crate_universe/src/parser.rs b/crate_universe/src/parser.rs deleted file mode 100644 index 5906eef4ce..0000000000 --- a/crate_universe/src/parser.rs +++ /dev/null @@ -1,456 +0,0 @@ -use std::{ - collections::{BTreeMap, BTreeSet}, - convert::{TryFrom, TryInto}, - fs::read_to_string, - path::PathBuf, -}; - -use anyhow::{anyhow, Context}; -use indoc::indoc; -use log::*; -use semver::{Version, VersionReq}; -use serde::{Deserialize, Deserializer}; -use toml::Value; - -use crate::config::Package as AdditionalPackage; - -#[derive(Debug, Deserialize)] -// We deny unknown fields so that when new fields are encountered, we need to explicitly decide -// whether they affect dependency resolution or not. -// For our first few users, this will be annoying, but it's hopefully worth it for the correctness. -#[serde(deny_unknown_fields)] -pub struct CargoToml { - pub package: Package, - pub dependencies: BTreeMap, - #[serde(rename = "build-dependencies", default = "BTreeMap::new")] - pub build_dependencies: BTreeMap, - #[serde(rename = "dev-dependencies", default = "BTreeMap::new")] - pub dev_dependencies: BTreeMap, - - #[serde(default = "BTreeMap::new")] - pub patch: BTreeMap>, - - #[serde(flatten)] - _ignored: Option, -} - -#[derive(Debug, Deserialize)] -// Allows unknown fields - we assume everything in Package doesn't affect dependency resolution. -pub struct Package { - pub name: String, - pub version: Version, -} - -#[derive(Debug, PartialEq, Eq)] -pub struct DepSpec { - pub default_features: bool, - pub features: BTreeSet, - pub version: VersionSpec, -} - -#[derive(Debug, PartialEq, Eq)] -pub enum VersionSpec { - Semver { - version_req: VersionReq, - registry: Option, - }, - Git { - url: String, - rev: Option, - tag: Option, - }, - Local(PathBuf), -} - -/// Fields in the top-level CargoToml which are ignored. -/// Only add new fields here if you are certain they cannot affect dependency resolution. -/// Cargo.toml docs: https://doc.rust-lang.org/cargo/reference/manifest.html -#[derive(Debug, Deserialize)] -struct Ignored { - // Target tables - lib: serde::de::IgnoredAny, - bin: serde::de::IgnoredAny, - example: serde::de::IgnoredAny, - test: serde::de::IgnoredAny, - bench: serde::de::IgnoredAny, - profile: serde::de::IgnoredAny, - - // Other - features: serde::de::IgnoredAny, - badges: serde::de::IgnoredAny, - // Not ignored: - // replace: deprecated alternative to patch, use patch instead. - // cargo-features: unstable nightly features, evaluate on a case-by-case basis. - // workspace: TODO: support cargo workspaces. - // target: TODO: support platform-specific dependencies. -} - -pub fn merge_cargo_tomls( - known_registry_names: &BTreeSet, - label_to_path: BTreeMap, - packages: Vec, -) -> anyhow::Result<(CargoToml, BTreeMap>)> { - let mut merged_cargo_toml: CargoToml = indoc! { r#" - [package] - name = "dummy_package_for_crate_universe_resolver" - version = "0.1.0" - - [lib] - path = "doesnotexist.rs" - - [dependencies] - "# } - .try_into()?; - - let mut labels_to_deps = BTreeMap::new(); - - for (label, path) in label_to_path { - let mut all_dep_names = BTreeSet::new(); - - trace!("Parsing {:?}", path); - let content = - read_to_string(&path).with_context(|| format!("Failed to read {:?}", path))?; - let cargo_toml = CargoToml::try_from(content.as_str()) - .with_context(|| format!("Error parsing {:?}", path))?; - let CargoToml { - dependencies, - build_dependencies, - dev_dependencies, - patch, - package: _, - _ignored, - } = cargo_toml; - for dep_spec in dependencies - .values() - .chain(build_dependencies.values()) - .chain(dev_dependencies.values()) - { - if let VersionSpec::Semver { - registry: Some(registry), - .. - } = &dep_spec.version - { - if !known_registry_names.contains(registry) { - anyhow::bail!( - "Saw dep for unknown registry {} - known registry names: {:?}", - registry, - known_registry_names - ); - } - } - } - - for (dep, dep_spec) in dependencies.into_iter() { - if let VersionSpec::Local(_) = dep_spec.version { - // We ignore local deps. - debug!("Ignoring local path dependency on {:?}", path); - continue; - } - all_dep_names.insert(dep.clone()); - if let Some(dep_spec_to_merge) = merged_cargo_toml.dependencies.get_mut(&dep) { - dep_spec_to_merge - .merge(dep_spec) - .context(format!("Failed to merge multiple dependencies on {}", dep))?; - } else { - merged_cargo_toml.dependencies.insert(dep, dep_spec); - } - } - - for (dep, dep_spec) in build_dependencies.into_iter() { - if let VersionSpec::Local(_) = dep_spec.version { - // We ignore local deps. - debug!("Ignoring local path dependency on {:?}", path); - continue; - } - all_dep_names.insert(dep.clone()); - if let Some(dep_spec_to_merge) = merged_cargo_toml.build_dependencies.get_mut(&dep) { - dep_spec_to_merge - .merge(dep_spec) - .context(format!("Failed to merge multiple dependencies on {}", dep))?; - } else { - merged_cargo_toml.build_dependencies.insert(dep, dep_spec); - } - } - - for (dep, dep_spec) in dev_dependencies.into_iter() { - if let VersionSpec::Local(_) = dep_spec.version { - // We ignore local deps. - debug!("Ignoring local path dependency on {:?}", path); - continue; - } - all_dep_names.insert(dep.clone()); - if let Some(dep_spec_to_merge) = merged_cargo_toml.dev_dependencies.get_mut(&dep) { - dep_spec_to_merge - .merge(dep_spec) - .context(format!("Failed to merge multiple dependencies on {}", dep))?; - } else { - merged_cargo_toml.dev_dependencies.insert(dep, dep_spec); - } - } - - for (repo, deps) in patch { - if let Some(repo_map) = merged_cargo_toml.patch.get_mut(&repo) { - for (dep, dep_spec) in deps { - if let Some(existing_dep_spec) = repo_map.get_mut(&dep) { - existing_dep_spec.merge(dep_spec).context(format!( - "Failed to merge multiple patches of {} in {}", - dep, repo - ))?; - } else { - repo_map.insert(dep, dep_spec); - } - } - } else { - merged_cargo_toml.patch.insert(repo, deps); - } - } - - labels_to_deps.insert(label.clone(), all_dep_names); - } - - // Check for conflicts between packages in Cargo.toml and packages in crate_universe(). - // TODO: only mark packages as conflicting if names are the same but versions are incompatible. - let cargo_toml_package_set: BTreeSet<_> = - merged_cargo_toml.dependencies.keys().cloned().collect(); - let repo_rule_package_set: BTreeSet<_> = packages.iter().map(|p| p.name.clone()).collect(); - - let conflicting_pkgs: BTreeSet<_> = cargo_toml_package_set - .intersection(&repo_rule_package_set) - .collect(); - if !conflicting_pkgs.is_empty() { - let conflicting_pkgs: Vec<_> = conflicting_pkgs.into_iter().cloned().collect(); - // TODO: Mention which one, from labels_to_deps. - return Err(anyhow!("The following package{} provided both in a Cargo.toml and in the crate_universe repository rule: {}.", if conflicting_pkgs.len() == 1 { " was" } else { "s were" }, conflicting_pkgs.join(", "))); - } - - for package in packages { - let AdditionalPackage { - name, - semver, - features, - } = package; - - merged_cargo_toml.dependencies.insert( - name.clone(), - DepSpec { - default_features: true, - features: features.into_iter().collect(), - version: VersionSpec::Semver { - version_req: VersionReq::parse(&semver).with_context(|| { - format!( - "Failed to parse semver requirement for package {}, semver: {}", - name, semver - ) - })?, - // TODO: Support custom registries for additional packages - registry: None, - }, - }, - ); - } - - Ok((merged_cargo_toml, labels_to_deps)) -} - -impl TryFrom<&str> for CargoToml { - type Error = anyhow::Error; - - fn try_from(value: &str) -> Result { - Ok(toml::from_str(value)?) - } -} - -impl From for toml::Value { - fn from(cargo_toml: CargoToml) -> Value { - let CargoToml { - package, - dependencies, - build_dependencies, - dev_dependencies, - patch, - _ignored, - } = cargo_toml; - - let mut v = toml::value::Table::new(); - - v.insert(String::from("package"), package.into()); - - v.insert( - String::from("lib"), - toml::Value::Table({ - let mut table = toml::value::Table::new(); - // cargo-metadata fails without this key. - table.insert( - String::from("path"), - toml::Value::String(String::from("doesnotexist.rs")), - ); - table - }), - ); - - if !dependencies.is_empty() { - v.insert( - String::from("dependencies"), - table_of_dep_specs_to_toml(dependencies), - ); - } - if !build_dependencies.is_empty() { - v.insert( - String::from("build-dependencies"), - table_of_dep_specs_to_toml(build_dependencies), - ); - } - if !dev_dependencies.is_empty() { - v.insert( - String::from("dev-dependencies"), - table_of_dep_specs_to_toml(dev_dependencies), - ); - } - - if !patch.is_empty() { - v.insert( - String::from("patch"), - toml::Value::Table({ - let mut table = toml::value::Table::new(); - for (repo, patches) in patch { - table.insert(repo, table_of_dep_specs_to_toml(patches)); - } - table - }), - ); - } - - toml::Value::Table(v) - } -} - -fn table_of_dep_specs_to_toml(table: BTreeMap) -> toml::Value { - toml::Value::Table( - table - .into_iter() - .filter_map(|(dep_name, dep_spec)| { - dep_spec.to_cargo_toml_dep().map(|dep| (dep_name, dep)) - }) - .collect(), - ) -} - -impl From for toml::Value { - fn from(package: Package) -> Self { - let Package { name, version } = package; - - let mut v = toml::value::Table::new(); - v.insert(String::from("name"), toml::Value::String(name)); - v.insert( - String::from("version"), - toml::Value::String(format!("{}", version)), - ); - - toml::Value::Table(v) - } -} - -impl<'de> Deserialize<'de> for DepSpec { - fn deserialize(deserializer: D) -> Result>::Error> - where - D: Deserializer<'de>, - { - deserializer.deserialize_any(crate::serde_utils::DepSpecDeserializer) - } -} - -impl DepSpec { - fn merge(&mut self, other: DepSpec) -> Result<(), anyhow::Error> { - self.default_features |= other.default_features; - - self.features.extend(other.features.clone()); - - match (&mut self.version, &other.version) { - (v1, v2) if v1 == v2 => {} - ( - VersionSpec::Semver { - version_req: v1, - registry: registry1, - }, - VersionSpec::Semver { - version_req: v2, - registry: registry2, - }, - ) => { - if registry1 != registry2 { - return Err(anyhow!( - "Can't merge the same package from different registries (saw registries {:?} and {:?})", - registry1, - registry2, - )); - } - self.version = VersionSpec::Semver { - version_req: VersionReq::parse(&format!("{}, {}", v1, v2))?, - registry: registry1.clone(), - }; - } - (v1 @ VersionSpec::Git { .. }, v2 @ VersionSpec::Git { .. }) => { - return Err(anyhow!( - "Can't merge different git versions of the same dependency (saw {:?} and {:?})", - v1, - v2 - )) - } - (v1, v2) => { - return Err(anyhow!( - "Can't merge semver and git versions of the same dependency (saw: {:?} and {:?})", - v1, - v2 - )) - } - } - Ok(()) - } - - fn to_cargo_toml_dep(self) -> Option { - let Self { - default_features, - features, - version, - } = self; - - let mut v = toml::value::Table::new(); - v.insert( - String::from("default-features"), - toml::Value::Boolean(default_features), - ); - v.insert( - String::from("features"), - toml::Value::Array(features.into_iter().map(toml::Value::String).collect()), - ); - match version { - VersionSpec::Semver { - version_req, - registry, - } => { - v.insert( - String::from("version"), - toml::Value::String(format!("{}", version_req)), - ); - if let Some(registry) = registry { - v.insert(String::from("registry"), toml::Value::String(registry)); - } - } - VersionSpec::Git { url, rev, tag } => { - v.insert(String::from("git"), toml::Value::String(url)); - if let Some(rev) = rev { - v.insert(String::from("rev"), toml::Value::String(rev)); - } - if let Some(tag) = tag { - v.insert(String::from("tag"), toml::Value::String(tag)); - } - } - VersionSpec::Local(path) => { - eprintln!("Ignoring local path dependency on {:?}", path); - return None; - } - } - - Some(toml::Value::Table(v)) - } -} diff --git a/crate_universe/src/renderer.rs b/crate_universe/src/renderer.rs deleted file mode 100644 index 52fe173d12..0000000000 --- a/crate_universe/src/renderer.rs +++ /dev/null @@ -1,907 +0,0 @@ -use std::{ - collections::{BTreeMap, BTreeSet, HashMap, HashSet}, - fs::File, - io::{BufReader, Write}, - path::Path, -}; - -use anyhow::Context; -use cargo_raze::context::{CrateContext, CrateDependencyContext, CrateTargetedDepContext}; -use config::crate_to_repo_rule_name; -use semver::Version; -use serde::{Deserialize, Serialize}; -use tera::{self, Tera}; - -use crate::{config, resolver::Dependencies}; - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] -pub struct RenderConfig { - pub repo_rule_name: String, - pub rules_rust_workspace_name: String, -} - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] -struct RenderContext { - pub config: RenderConfig, - pub hash: String, - pub transitive_renderable_packages: Vec, - pub member_packages_version_mapping: Dependencies, - pub label_to_crates: BTreeMap>, -} - -pub struct Renderer { - context: RenderContext, - internal_renderer: Tera, -} - -/// Fully qualified label representing a platform condition. -#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Serialize, Deserialize, Debug)] -#[serde(transparent)] -pub struct PlatformLabel(String); - -impl PlatformLabel { - pub fn default() -> Self { - Self(String::from("//conditions:default")) - } - - pub fn from_bazel_triple(bazel_triple: &str) -> Self { - Self(format!("@rules_rust//rust/platform:{}", bazel_triple)) - } -} - -// Get default and targeted metadata, collated per Bazel condition (which corresponds to a triple). -// The default metadata is included in every triple. -fn get_per_triple_metadata( - package: &CrateContext, -) -> BTreeMap { - let mut per_triple_metadata: BTreeMap = BTreeMap::new(); - - // Always add a catch-all to cover the non-targeted dep case. - // We merge in the default_deps after the next loop. - per_triple_metadata.insert( - PlatformLabel::default(), - CrateTargetedDepContext { - target: "Default".to_owned(), - deps: empty_deps_context(), - platform_targets: vec!["//conditions:default".to_owned()], - }, - ); - - for dep_context in &package.targeted_deps { - dep_context - .platform_targets - .iter() - .for_each(|platform_bazel_triple| { - let targeted_dep_ctx = per_triple_metadata - .entry(PlatformLabel::from_bazel_triple(platform_bazel_triple)) - .or_insert(CrateTargetedDepContext { - target: "".to_owned(), - deps: empty_deps_context(), - platform_targets: vec![platform_bazel_triple.clone()], - }); - - // Mention all the targets that translated into the current condition (ie. current triplet). - targeted_dep_ctx - .target - .push_str(&format!(" {}", &dep_context.target)); - - targeted_dep_ctx - .deps - .dependencies - .extend(dep_context.deps.dependencies.iter().cloned()); - targeted_dep_ctx - .deps - .proc_macro_dependencies - .extend(dep_context.deps.proc_macro_dependencies.iter().cloned()); - targeted_dep_ctx - .deps - .data_dependencies - .extend(dep_context.deps.data_dependencies.iter().cloned()); - targeted_dep_ctx - .deps - .build_dependencies - .extend(dep_context.deps.build_dependencies.iter().cloned()); - targeted_dep_ctx.deps.build_proc_macro_dependencies.extend( - dep_context - .deps - .build_proc_macro_dependencies - .iter() - .cloned(), - ); - targeted_dep_ctx - .deps - .build_data_dependencies - .extend(dep_context.deps.build_data_dependencies.iter().cloned()); - targeted_dep_ctx - .deps - .dev_dependencies - .extend(dep_context.deps.dev_dependencies.iter().cloned()); - targeted_dep_ctx.deps.aliased_dependencies.extend( - dep_context - .deps - .aliased_dependencies - .iter() - .map(|(k, v)| (k.clone(), v.clone())), - ); - }); - } - - // Now also add the non-targeted deps to each target. - for ctx in per_triple_metadata.values_mut() { - ctx.deps - .dependencies - .extend(package.default_deps.dependencies.iter().cloned()); - ctx.deps - .proc_macro_dependencies - .extend(package.default_deps.proc_macro_dependencies.iter().cloned()); - ctx.deps - .data_dependencies - .extend(package.default_deps.data_dependencies.iter().cloned()); - ctx.deps - .build_dependencies - .extend(package.default_deps.build_dependencies.iter().cloned()); - ctx.deps.build_proc_macro_dependencies.extend( - package - .default_deps - .build_proc_macro_dependencies - .iter() - .cloned(), - ); - ctx.deps - .build_data_dependencies - .extend(package.default_deps.build_data_dependencies.iter().cloned()); - ctx.deps - .dev_dependencies - .extend(package.default_deps.dev_dependencies.iter().cloned()); - ctx.deps.aliased_dependencies.extend( - package - .default_deps - .aliased_dependencies - .iter() - .map(|(k, v)| (k.clone(), v.clone())), - ); - } - - per_triple_metadata -} - -fn empty_deps_context() -> CrateDependencyContext { - CrateDependencyContext { - dependencies: BTreeSet::new(), - proc_macro_dependencies: BTreeSet::new(), - data_dependencies: BTreeSet::new(), - build_dependencies: BTreeSet::new(), - build_proc_macro_dependencies: BTreeSet::new(), - build_data_dependencies: BTreeSet::new(), - dev_dependencies: BTreeSet::new(), - aliased_dependencies: BTreeMap::new(), - } -} - -impl Renderer { - fn new_tera() -> Tera { - let mut internal_renderer = Tera::new("src/not/a/dir/*").unwrap(); - - internal_renderer.register_function( - "crate_to_repo_rule_name", - |args: &HashMap| { - let value = config::crate_to_repo_rule_name( - string_arg(args, "repo_rule_name")?, - string_arg(args, "package_name")?, - string_arg(args, "package_version")?, - ); - Ok(tera::Value::String(value)) - }, - ); - - internal_renderer.register_function( - "crate_to_label", - |args: &HashMap| { - let value = config::crate_to_label( - string_arg(args, "repo_rule_name")?, - string_arg(args, "package_name")?, - string_arg(args, "package_version")?, - ); - Ok(tera::Value::String(value)) - }, - ); - - internal_renderer - .add_raw_templates(vec![ - ( - "templates/defs.bzl.template", - include_str!("templates/defs.bzl.template"), - ), - ( - "templates/helper_functions.template", - include_str!("templates/helper_functions.template"), - ), - ( - "templates/partials/build_script.template", - include_str!("templates/partials/build_script.template"), - ), - ( - "templates/partials/rust_binary.template", - include_str!("templates/partials/rust_binary.template"), - ), - ( - "templates/partials/rust_library.template", - include_str!("templates/partials/rust_library.template"), - ), - ( - "templates/partials/common_attrs.template", - include_str!("templates/partials/common_attrs.template"), - ), - ( - "templates/BUILD.crate.bazel.template", - include_str!("templates/BUILD.crate.bazel.template"), - ), - ( - "templates/partials/targeted_aliases.template", - include_str!("templates/partials/targeted_aliases.template"), - ), - ( - "templates/partials/targeted_dependencies.template", - include_str!("templates/partials/targeted_dependencies.template"), - ), - ( - "templates/partials/targeted_data_dependencies.template", - include_str!("templates/partials/targeted_data_dependencies.template"), - ), - ( - "templates/partials/targeted_build_script_dependencies.template", - include_str!("templates/partials/targeted_build_script_dependencies.template"), - ), - ( - "templates/partials/targeted_build_script_data_dependencies.template", - include_str!( - "templates/partials/targeted_build_script_data_dependencies.template" - ), - ), - ( - "templates/partials/default_data_dependencies.template", - include_str!("templates/partials/default_data_dependencies.template"), - ), - ( - "templates/partials/git_repository.template", - include_str!("templates/partials/git_repository.template"), - ), - ( - "templates/partials/http_archive.template", - include_str!("templates/partials/http_archive.template"), - ), - ]) - .unwrap(); - - internal_renderer - } - - pub fn new( - config: RenderConfig, - hash: String, - transitive_packages: Vec, - member_packages_version_mapping: Dependencies, - label_to_crates: BTreeMap>, - ) -> Renderer { - let transitive_renderable_packages = transitive_packages - .into_iter() - .map(|mut crate_context| { - let per_triple_metadata = get_per_triple_metadata(&crate_context); - - if let Some(git_repo) = &crate_context.source_details.git_data { - if let Some(prefix_to_strip) = &git_repo.path_to_crate_root { - for mut target in crate_context - .targets - .iter_mut() - .chain(crate_context.build_script_target.iter_mut()) - { - let path = Path::new(&target.path); - let prefix_to_strip_path = Path::new(prefix_to_strip); - target.path = path - .strip_prefix(prefix_to_strip_path) - .unwrap() - .to_str() - .unwrap() - .to_owned(); - } - } - } - - let is_proc_macro = crate_context - .targets - .iter() - .any(|target| target.kind == "proc-macro"); - - RenderablePackage { - crate_context, - per_triple_metadata, - is_proc_macro, - } - }) - .collect(); - - Self { - context: RenderContext { - config, - hash, - transitive_renderable_packages, - member_packages_version_mapping, - label_to_crates, - }, - internal_renderer: Renderer::new_tera(), - } - } - - pub fn new_from_lockfile(lockfile: &Path) -> anyhow::Result { - // Open the file in read-only mode with buffer. - let file = File::open(lockfile)?; - let reader = BufReader::new(file); - - Ok(Self { - context: serde_json::from_reader(reader)?, - internal_renderer: Renderer::new_tera(), - }) - } - - pub fn render(&self, repository_dir: &Path) -> anyhow::Result<()> { - let defs_bzl_path = repository_dir.join("defs.bzl"); - let mut defs_bzl_file = std::fs::File::create(&defs_bzl_path) - .with_context(|| format!("Could not create output file {}", defs_bzl_path.display()))?; - - self.render_workspaces(&mut defs_bzl_file)?; - writeln!(defs_bzl_file)?; - self.render_helper_functions(&mut defs_bzl_file)?; - - self.render_crates(repository_dir)?; - - Ok(()) - } - - pub fn render_lockfile(&self, lockfile_path: &Path) -> anyhow::Result<()> { - let mut lockfile_file = std::fs::File::create(lockfile_path) - .with_context(|| format!("Could not create lockfile file: {:?}", lockfile_path))?; - let content = serde_json::to_string_pretty(&self.context) - .with_context(|| format!("Could not seralize render context: {:?}", self.context))?; - writeln!(lockfile_file, "{}", &content)?; - - Ok(()) - } - - /// Render `BUILD.bazel` files for all dependencies into the repository directory. - fn render_crates(&self, repository_dir: &Path) -> anyhow::Result<()> { - for crate_data in &self.context.transitive_renderable_packages { - let mut context = tera::Context::new(); - context.insert("crate", &crate_data.crate_context); - context.insert("per_triple_metadata", &crate_data.per_triple_metadata); - context.insert("repo_rule_name", &self.context.config.repo_rule_name); - context.insert( - "repository_name", - &crate_to_repo_rule_name( - &self.context.config.repo_rule_name, - &crate_data.crate_context.pkg_name, - &crate_data.crate_context.pkg_version.to_string(), - ), - ); - let build_file_content = self - .internal_renderer - .render("templates/BUILD.crate.bazel.template", &context)?; - - let build_file_path = repository_dir.join(format!( - // This must match the format found in the repository rule templates - "BUILD.{}-{}.bazel", - crate_data.crate_context.pkg_name, crate_data.crate_context.pkg_version - )); - let mut build_file = File::create(&build_file_path).with_context(|| { - format!("Could not create BUILD file: {}", build_file_path.display()) - })?; - writeln!(build_file, "{}", &build_file_content)?; - } - - Ok(()) - } - - fn render_workspaces(&self, output: &mut Out) -> anyhow::Result<()> { - let mut context = tera::Context::new(); - context.insert("lockfile_hash", &self.context.hash); - context.insert("crates", &self.context.transitive_renderable_packages); - context.insert("repo_rule_name", &self.context.config.repo_rule_name); - let rendered_repository_rules = self - .internal_renderer - .render("templates/defs.bzl.template", &context)?; - - write!(output, "{}", &rendered_repository_rules)?; - - Ok(()) - } - - fn render_helper_functions(&self, output: &mut Out) -> anyhow::Result<()> { - let mut crate_repo_names_inner = BTreeMap::new(); - crate_repo_names_inner.extend(&self.context.member_packages_version_mapping.normal); - crate_repo_names_inner.extend(&self.context.member_packages_version_mapping.build); - crate_repo_names_inner.extend(&self.context.member_packages_version_mapping.dev); - - let renderable_packages: Vec<_> = self - .context - .transitive_renderable_packages - .iter() - .filter(|krate| { - crate_repo_names_inner.get(&krate.crate_context.pkg_name) - == Some(&&krate.crate_context.pkg_version) - }) - .collect(); - - let (proc_macro_crates, default_crates): (Vec<_>, Vec<_>) = self - .context - .member_packages_version_mapping - .normal - .iter() - .partition(|(name, version)| { - self.context - .transitive_renderable_packages - .iter() - .any(|package| { - *package.crate_context.pkg_name == **name - && package.crate_context.pkg_version == **version - && package.is_proc_macro - }) - }); - - let mut kind_to_labels_to_crate_names = BTreeMap::new(); - kind_to_labels_to_crate_names - .insert(Kind::Normal, self.label_to_crate_names(&default_crates)); - kind_to_labels_to_crate_names.insert( - Kind::Dev, - self.label_to_crate_names( - &self - .context - .member_packages_version_mapping - .dev - .iter() - .collect(), - ), - ); - kind_to_labels_to_crate_names.insert( - Kind::Build, - self.label_to_crate_names( - &self - .context - .member_packages_version_mapping - .build - .iter() - .collect(), - ), - ); - kind_to_labels_to_crate_names.insert( - Kind::ProcMacro, - self.label_to_crate_names(&proc_macro_crates), - ); - - let mut context = tera::Context::new(); - context.insert("crates", &renderable_packages); - context.insert("repo_rule_name", &self.context.config.repo_rule_name); - context.insert( - "kind_to_labels_to_crate_names", - &kind_to_labels_to_crate_names, - ); - let rendered_helper_functions = self - .internal_renderer - .render("templates/helper_functions.template", &context)?; - - write!(output, "{}", &rendered_helper_functions)?; - - Ok(()) - } - - fn label_to_crate_names( - &self, - crates: &Vec<(&String, &Version)>, - ) -> BTreeMap> { - let crate_names: HashSet<&String> = crates.iter().map(|(name, _)| *name).collect(); - self.context - .label_to_crates - .iter() - .map(|(label, all_crates)| { - let value = all_crates - .iter() - .filter(|crate_name| crate_names.contains(crate_name)) - .map(|crate_name| crate_name.to_owned()) - .collect::>(); - (label.clone(), value) - }) - .collect() - } - - pub fn matches_digest(&self, digest: &str) -> bool { - self.context.hash == digest - } -} - -fn string_arg<'a, 'b>( - args: &'a HashMap, - name: &'b str, -) -> Result<&'a str, tera::Error> { - let value = args - .get(name) - .ok_or_else(|| tera::Error::msg(&format!("Missing argument {:?}", name)))?; - value.as_str().ok_or_else(|| { - tera::Error::msg(&format!( - "Wrong argument type, expected string for {:?}", - name - )) - }) -} - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] -struct RenderablePackage { - crate_context: CrateContext, - per_triple_metadata: BTreeMap, - is_proc_macro: bool, -} - -#[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Serialize)] -enum Kind { - Normal, - Dev, - Build, - ProcMacro, -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::testing; - - use indoc::indoc; - use maplit::{btreemap, btreeset}; - - fn mock_renderer(git: bool) -> Renderer { - Renderer::new( - default_render_config(), - String::from("598"), - vec![testing::lazy_static_crate_context(git)], - empty_dependencies(), - BTreeMap::new(), - ) - } - - #[test] - fn render_http_archive() { - let renderer = mock_renderer(false); - - let mut output = Vec::new(); - - renderer - .render_workspaces(&mut output) - .expect("Error rendering"); - - let output = String::from_utf8(output).expect("Non-UTF8 output"); - - let expected_repository_rule = indoc! { r#" - load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - - def pinned_rust_install(): - maybe( - http_archive, - name = "rule_prefix__lazy_static__1_4_0", - build_file = Label("//:BUILD.lazy_static-1.4.0.bazel"), - sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646", - strip_prefix = "lazy_static-1.4.0", - type = "tar.gz", - url = "https://crates.io/api/v1/crates/lazy_static/1.4.0/download", - ) - - "# }; - - assert_eq!(output, expected_repository_rule); - } - - #[test] - fn render_git_repository() { - let renderer = mock_renderer(true); - - let mut output = Vec::new(); - - renderer - .render_workspaces(&mut output) - .expect("Error rendering"); - - let output = String::from_utf8(output).expect("Non-UTF8 output"); - - let expected_repository_rule = indoc! { r#" - load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") - load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - - def pinned_rust_install(): - maybe( - new_git_repository, - name = "rule_prefix__lazy_static__1_4_0", - strip_prefix = "", - build_file = Label("//:BUILD.lazy_static-1.4.0.bazel"), - init_submodules = True, - remote = "https://github.com/rust-lang-nursery/lazy-static.rs.git", - commit = "421669662b35fcb455f2902daed2e20bbbba79b6", - ) - - "# }; - - assert_eq!(output, expected_repository_rule); - } - - #[test] - fn render_http_and_git() { - let renderer = { - let mut renderer = mock_renderer(true); - renderer - .context - .transitive_renderable_packages - .push(RenderablePackage { - crate_context: testing::maplit_crate_context(false), - per_triple_metadata: BTreeMap::new(), - is_proc_macro: false, - }); - renderer - }; - - let mut output = Vec::new(); - - renderer - .render_workspaces(&mut output) - .expect("Error rendering"); - - let output = String::from_utf8(output).expect("Non-UTF8 output"); - - let expected_repository_rule = indoc! { r#" - load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") - load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - - def pinned_rust_install(): - maybe( - new_git_repository, - name = "rule_prefix__lazy_static__1_4_0", - strip_prefix = "", - build_file = Label("//:BUILD.lazy_static-1.4.0.bazel"), - init_submodules = True, - remote = "https://github.com/rust-lang-nursery/lazy-static.rs.git", - commit = "421669662b35fcb455f2902daed2e20bbbba79b6", - ) - - maybe( - http_archive, - name = "rule_prefix__maplit__1_0_2", - build_file = Label("//:BUILD.maplit-1.0.2.bazel"), - sha256 = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d", - strip_prefix = "maplit-1.0.2", - type = "tar.gz", - url = "https://crates.io/api/v1/crates/maplit/1.0.2/download", - ) - - "# }; - - assert_eq!(output, expected_repository_rule); - } - - #[test] - fn render_no_crates() { - let renderer = Renderer::new( - default_render_config(), - String::from("598"), - vec![], - empty_dependencies(), - BTreeMap::new(), - ); - - let mut output = Vec::new(); - - renderer - .render_workspaces(&mut output) - .expect("Error rendering"); - - let output = String::from_utf8(output).expect("Non-UTF8 output"); - - let expected_repository_rule = indoc! { r#" - def pinned_rust_install(): - pass - - "# }; - - assert_eq!(output, expected_repository_rule); - } - - #[test] - fn render_defs_bzl() { - let crate_context = testing::lazy_static_crate_context(false); - - let normal_deps = btreemap! { - crate_context.pkg_name.clone() => crate_context.pkg_version.clone(), - }; - - let renderer = Renderer::new( - RenderConfig { - repo_rule_name: String::from("rule_prefix"), - rules_rust_workspace_name: String::from("rules_rust"), - }, - String::from("598"), - vec![crate_context], - Dependencies { - normal: normal_deps, - build: BTreeMap::new(), - dev: BTreeMap::new(), - }, - btreemap! { - String::from("//some:Cargo.toml") => btreeset!{ String::from("lazy_static") }, - }, - ); - - let mut output = Vec::new(); - - renderer - .render_helper_functions(&mut output) - .expect("Error rendering"); - - let output = String::from_utf8(output).expect("Non-UTF8 output"); - - // TODO: Have a single function with kwargs to enable each kind of dep, rather than multiple functions. - let expected_repository_rule = indoc! { r#" - CRATE_TARGET_NAMES = { - "lazy_static": "@rule_prefix__lazy_static__1_4_0//:lazy_static", - } - - def crate(crate_name): - """Return the name of the target for the given crate. - """ - target_name = CRATE_TARGET_NAMES.get(crate_name) - if target_name == None: - fail("Unknown crate name: {}".format(crate_name)) - return target_name - - def all_deps(): - """Return all standard dependencies explicitly listed in the Cargo.toml or packages list.""" - return [ - crate(crate_name) for crate_name in [ - "lazy_static", - ] - ] - - def all_proc_macro_deps(): - """Return all proc-macro dependencies explicitly listed in the Cargo.toml or packages list.""" - return [ - crate(crate_name) for crate_name in [ - ] - ] - - def crates_from(label): - mapping = { - "//some:Cargo.toml": [ - crate("lazy_static"), - ], - } - return mapping[_absolutify(label)] - - def dev_crates_from(label): - mapping = { - "//some:Cargo.toml": [ - ], - } - return mapping[_absolutify(label)] - - def build_crates_from(label): - mapping = { - "//some:Cargo.toml": [ - ], - } - return mapping[_absolutify(label)] - - def proc_macro_crates_from(label): - mapping = { - "//some:Cargo.toml": [ - ], - } - return mapping[_absolutify(label)] - - def _absolutify(label): - if label.startswith("//") or label.startswith("@"): - return label - if label.startswith(":"): - return "//" + native.package_name() + label - return "//" + native.package_name() + ":" + label - "# }; - - assert_eq!(output, expected_repository_rule); - } - - #[test] - fn render_crate_build_file() { - let renderer = mock_renderer(true); - - let repository_dir = tempfile::TempDir::new().unwrap(); - renderer.render_crates(repository_dir.as_ref()).unwrap(); - - let build_file_path = repository_dir - .as_ref() - .join("BUILD.lazy_static-1.4.0.bazel"); - let build_file_contents = std::fs::read_to_string(&build_file_path) - .expect(&format!("Failed to read {}", build_file_path.display())); - - assert_eq!( - indoc! { r#" - # buildifier: disable=load - load( - "@rules_rust//rust:defs.bzl", - "rust_binary", - "rust_library", - "rust_proc_macro", - "rust_test", - ) - - # buildifier: disable=load - load("@bazel_skylib//lib:selects.bzl", "selects") - - package(default_visibility = [ - "//visibility:public", - ]) - - licenses([ - "restricted", # no license - ]) - - # Generated targets - - # buildifier: leave-alone - rust_library( - name = "lazy_static", - deps = [ - ], - srcs = glob(["**/*.rs"]), - crate_root = "src/lib.rs", - edition = "2015", - rustc_flags = [ - "--cap-lints=allow", - ], - data = glob(["**"], exclude=[ - # These can be manually added with overrides if needed. - - # If you run `cargo build` in this dir, the target dir can get very big very quick. - "target/**", - - # These are not vendored from the crate - we exclude them to avoid busting caches - # when we change how we generate BUILD files and such. - "BUILD.bazel", - "WORKSPACE.bazel", - "WORKSPACE", - ]), - version = "1.4.0", - tags = [ - "cargo-raze", - "manual", - ], - crate_features = [ - ], - aliases = select({ - # Default - "//conditions:default": { - }, - }), - ) - - "# }, - build_file_contents, - ); - } - - fn default_render_config() -> RenderConfig { - RenderConfig { - repo_rule_name: String::from("rule_prefix"), - rules_rust_workspace_name: String::from("rules_rust"), - } - } - - fn empty_dependencies() -> Dependencies { - Dependencies { - normal: BTreeMap::new(), - build: BTreeMap::new(), - dev: BTreeMap::new(), - } - } -} diff --git a/crate_universe/src/rendering.rs b/crate_universe/src/rendering.rs new file mode 100644 index 0000000000..0c98608001 --- /dev/null +++ b/crate_universe/src/rendering.rs @@ -0,0 +1,470 @@ +//! Tools for rendering and writing BUILD and other Starlark files + +mod template_engine; + +use std::collections::BTreeMap; +use std::fs; +use std::path::{Path, PathBuf}; +use std::str::FromStr; + +use anyhow::{bail, Context as AnyhowContext, Result}; + +use crate::config::RenderConfig; +use crate::context::Context; +use crate::rendering::template_engine::TemplateEngine; +use crate::splicing::default_splicing_package_crate_id; +use crate::utils::starlark::Label; + +pub struct Renderer { + config: RenderConfig, + engine: TemplateEngine, +} + +impl Renderer { + pub fn new(config: RenderConfig) -> Self { + let engine = TemplateEngine::new(&config); + Self { config, engine } + } + + pub fn render(&self, context: &Context) -> Result> { + let mut output = BTreeMap::new(); + + output.extend(self.render_build_files(context)?); + output.extend(self.render_crates_module(context)?); + + if let Some(vendor_mode) = &self.config.vendor_mode { + match vendor_mode { + crate::config::VendorMode::Local => { + // Nothing to do for local vendor crate + } + crate::config::VendorMode::Remote => { + output.extend(self.render_vendor_support_files(context)?); + } + } + } + + Ok(output) + } + + fn render_crates_module(&self, context: &Context) -> Result> { + let module_label = render_module_label(&self.config.crates_module_template, "defs.bzl") + .context("Failed to resolve string to module file label")?; + let module_build_label = + render_module_label(&self.config.crates_module_template, "BUILD.bazel") + .context("Failed to resolve string to module file label")?; + + let mut map = BTreeMap::new(); + map.insert( + Renderer::label_to_path(&module_label), + self.engine.render_module_bzl(context)?, + ); + map.insert( + Renderer::label_to_path(&module_build_label), + self.engine.render_module_build_file(context)?, + ); + + Ok(map) + } + + fn render_build_files(&self, context: &Context) -> Result> { + let default_splicing_package_id = default_splicing_package_crate_id(); + self.engine + .render_crate_build_files(context)? + .into_iter() + // Do not render the default splicing package + .filter(|(id, _)| *id != &default_splicing_package_id) + // Do not render local packages + .filter(|(id, _)| !context.workspace_members.contains_key(id)) + .map(|(id, content)| { + let ctx = &context.crates[id]; + let label = match render_build_file_template( + &self.config.build_file_template, + &ctx.name, + &ctx.version, + ) { + Ok(label) => label, + Err(e) => bail!(e), + }; + + let filename = Renderer::label_to_path(&label); + + Ok((filename, content)) + }) + .collect() + } + + fn render_vendor_support_files(&self, context: &Context) -> Result> { + let module_label = render_module_label(&self.config.crates_module_template, "crates.bzl") + .context("Failed to resolve string to module file label")?; + + let mut map = BTreeMap::new(); + map.insert( + Renderer::label_to_path(&module_label), + self.engine.render_vendor_module_file(context)?, + ); + + Ok(map) + } + + fn label_to_path(label: &Label) -> PathBuf { + match &label.package { + Some(package) => PathBuf::from(format!("{}/{}", package, label.target)), + None => PathBuf::from(&label.target), + } + } +} + +/// Write a set of [CrateContext][crate::context::CrateContext] to disk. +pub fn write_outputs( + outputs: BTreeMap, + out_dir: &Path, + dry_run: bool, +) -> Result<()> { + let outputs: BTreeMap = outputs + .into_iter() + .map(|(path, content)| (out_dir.join(path), content)) + .collect(); + + if dry_run { + for (path, content) in outputs { + println!( + "===============================================================================" + ); + println!("{}", path.display()); + println!( + "===============================================================================" + ); + println!("{}\n", content); + } + } else { + for (path, content) in outputs { + // Ensure the output directory exists + fs::create_dir_all( + path.parent() + .expect("All file paths should have valid directories"), + )?; + + fs::write(&path, content.as_bytes()) + .context(format!("Failed to write file to disk: {}", path.display()))?; + } + } + + Ok(()) +} + +/// Render the Bazel label of a crate +pub fn render_crate_bazel_label( + template: &str, + repository_name: &str, + name: &str, + version: &str, + target: &str, +) -> String { + template + .replace("{repository}", repository_name) + .replace("{name}", name) + .replace("{version}", version) + .replace("{target}", target) +} + +/// Render the Bazel label of a crate +pub fn render_crate_bazel_repository( + template: &str, + repository_name: &str, + name: &str, + version: &str, +) -> String { + template + .replace("{repository}", repository_name) + .replace("{name}", name) + .replace("{version}", version) +} + +/// Render the Bazel label of a crate +pub fn render_crate_build_file(template: &str, name: &str, version: &str) -> String { + template + .replace("{name}", name) + .replace("{version}", version) +} + +/// Render the Bazel label of a vendor module label +pub fn render_module_label(template: &str, name: &str) -> Result