1load("@rules_license//rules:license.bzl", "license") 2load("@rules_license//rules:license_kind.bzl", "license_kind") 3load("@rules_rust//rust:defs.bzl", "rust_proc_macro") 4 5package( 6 default_applicable_licenses = [":license"], 7 default_visibility = ["//visibility:public"], 8) 9 10license( 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 20license_kind( 21 name = "SPDX-license-identifier-Apache-2.0", 22 conditions = ["notice"], 23 url = "https://spdx.org/licenses/Apache-2.0.html", 24) 25 26license_kind( 27 name = "SPDX-license-identifier-MIT", 28 conditions = ["notice"], 29 url = "", 30) 31 32rust_proc_macro( 33 name = "zerocopy-derive", 34 srcs = glob(["**/*.rs"]), 35 edition = "2018", 36 deps = [ 37 # This should map to repo checked out from Android third party project 38 # "platform/external/rust/crates/proc-macro2". Similar for the rest of the dependencies 39 # below. 40 "@proc-macro2", 41 # Map to project repo "platform/external/rust/crates/quote". 42 "@quote", 43 # Map to project repo "platform/external/rust/crates/syn". 44 "@syn", 45 ], 46) 47