diff options
author | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:44:38 +0000 |
---|---|---|
committer | Yecheng Zhao <zyecheng@google.com> | 2023-10-09 23:44:38 +0000 |
commit | a78015008cc96500b2c9246e9c53065c2ea97498 (patch) | |
tree | 90ad761fa47605d38d785f536fd78c5588fdf617 | |
parent | 6ca237bf0bdcbb68d2800654d10591f2a6b397c2 (diff) | |
download | hex-a78015008cc96500b2c9246e9c53065c2ea97498.tar.gz |
Add BUILD file for hex kleaf build
Test:
touch external/rust/crates/hex/WORKSPACE && \
b build @hex \
--override_repository=hex=external/rust/crates/hex
Bug: 304282799
Change-Id: I3e85aca5eef4472666d5f37414053df1bf3adbff
-rw-r--r-- | BUILD | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -0,0 +1,41 @@ +load("@rules_license//rules:license.bzl", "license") +load("@rules_license//rules:license_kind.bzl", "license_kind") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package( + default_applicable_licenses = [":license"], + default_visibility = ["//visibility:public"], +) + +license( + name = "license", + license_kinds = [ + ":SPDX-license-identifier-Apache-2.0", + ":SPDX-license-identifier-MIT", + ], + license_text = "LICENSE-APACHE", + visibility = [":__subpackages__"], +) + +license_kind( + name = "SPDX-license-identifier-Apache-2.0", + conditions = ["notice"], + url = "https://spdx.org/licenses/Apache-2.0.html", +) + +license_kind( + name = "SPDX-license-identifier-MIT", + conditions = ["notice"], + url = "", +) + +rust_library( + name = "hex", + srcs = glob(["**/*.rs"]), + crate_features = [ + "alloc", + "default", + "std", + ], + edition = "2018", +) |