Yecheng Zhao | a780150 | 2023-10-09 23:44:38 +0000 | [diff] [blame] | 1 | load("@rules_license//rules:license.bzl", "license") |
| 2 | load("@rules_license//rules:license_kind.bzl", "license_kind") |
| 3 | load("@rules_rust//rust:defs.bzl", "rust_library") |
| 4 | |
| 5 | package( |
| 6 | default_applicable_licenses = [":license"], |
| 7 | default_visibility = ["//visibility:public"], |
| 8 | ) |
| 9 | |
| 10 | license( |
| 11 | name = "license", |
| 12 | license_kinds = [ |
| 13 | ":SPDX-license-identifier-Apache-2.0", |
| 14 | ":SPDX-license-identifier-MIT", |
| 15 | ], |
| 16 | license_text = "LICENSE-APACHE", |
| 17 | visibility = [":__subpackages__"], |
| 18 | ) |
| 19 | |
| 20 | license_kind( |
| 21 | name = "SPDX-license-identifier-Apache-2.0", |
| 22 | conditions = ["notice"], |
| 23 | url = "https://spdx.org/licenses/Apache-2.0.html", |
| 24 | ) |
| 25 | |
| 26 | license_kind( |
| 27 | name = "SPDX-license-identifier-MIT", |
| 28 | conditions = ["notice"], |
| 29 | url = "", |
| 30 | ) |
| 31 | |
| 32 | rust_library( |
| 33 | name = "hex", |
| 34 | srcs = glob(["**/*.rs"]), |
| 35 | crate_features = [ |
| 36 | "alloc", |
| 37 | "default", |
| 38 | "std", |
| 39 | ], |
| 40 | edition = "2018", |
| 41 | ) |