[rust] Add arrayvec crate Signed-off-by: Chris Frantz <cfrantz@google.com>
diff --git a/third_party/rust/Cargo.lock b/third_party/rust/Cargo.lock index f712ea4..26dcd86 100644 --- a/third_party/rust/Cargo.lock +++ b/third_party/rust/Cargo.lock
@@ -75,6 +75,15 @@ ] [[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +dependencies = [ + "serde", +] + +[[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -166,6 +175,7 @@ dependencies = [ "ansi_term", "anyhow", + "arrayvec", "atty", "bitflags", "bitvec",
diff --git a/third_party/rust/Cargo.toml b/third_party/rust/Cargo.toml index e23d2fb..a397398 100644 --- a/third_party/rust/Cargo.toml +++ b/third_party/rust/Cargo.toml
@@ -14,6 +14,7 @@ # Please avoid version numbers that only have one component. [dependencies] anyhow = { version = "1.0.57", features=["backtrace"] } +arrayvec = { version = "0.7", features=["serde"] } atty = "0.2" bitflags = "1.0" bitvec = "1.0.1"
diff --git a/third_party/rust/crates/BUILD.arrayvec-0.7.2.bazel b/third_party/rust/crates/BUILD.arrayvec-0.7.2.bazel new file mode 100644 index 0000000..7686cf0 --- /dev/null +++ b/third_party/rust/crates/BUILD.arrayvec-0.7.2.bazel
@@ -0,0 +1,49 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run //third_party/rust:crate_index +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "arrayvec", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "serde", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=arrayvec", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.7.2", + deps = [ + "@crate_index__serde-1.0.152//:serde", + ], +)
diff --git a/third_party/rust/crates/BUILD.bazel b/third_party/rust/crates/BUILD.bazel index edd974e..00d9c30 100644 --- a/third_party/rust/crates/BUILD.bazel +++ b/third_party/rust/crates/BUILD.bazel
@@ -38,6 +38,12 @@ ) alias( + name = "arrayvec", + actual = "@crate_index__arrayvec-0.7.2//:arrayvec", + tags = ["manual"], +) + +alias( name = "atty", actual = "@crate_index__atty-0.2.14//:atty", tags = ["manual"],
diff --git a/third_party/rust/crates/defs.bzl b/third_party/rust/crates/defs.bzl index 9416d1b..87101ce 100644 --- a/third_party/rust/crates/defs.bzl +++ b/third_party/rust/crates/defs.bzl
@@ -293,6 +293,7 @@ _COMMON_CONDITION: { "ansi_term": "@crate_index__ansi_term-0.12.1//:ansi_term", "anyhow": "@crate_index__anyhow-1.0.69//:anyhow", + "arrayvec": "@crate_index__arrayvec-0.7.2//:arrayvec", "atty": "@crate_index__atty-0.2.14//:atty", "bitflags": "@crate_index__bitflags-1.3.2//:bitflags", "bitvec": "@crate_index__bitvec-1.0.1//:bitvec", @@ -530,6 +531,16 @@ maybe( http_archive, + name = "crate_index__arrayvec-0.7.2", + sha256 = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/arrayvec/0.7.2/download"], + strip_prefix = "arrayvec-0.7.2", + build_file = Label("@lowrisc_opentitan//third_party/rust/crates:BUILD.arrayvec-0.7.2.bazel"), + ) + + maybe( + http_archive, name = "crate_index__atty-0.2.14", sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8", type = "tar.gz",