1load("@rules_license//rules:license.bzl", "license") 2load("@rules_license//rules:license_kind.bzl", "license_kind") 3load("@rules_rust//rust:defs.bzl", "rust_library") 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_library( 33 name = "syn", 34 srcs = glob(["**/*.rs"]), 35 crate_features = [ 36 "clone-impls", 37 "default", 38 "derive", 39 "extra-traits", 40 "full", 41 "parsing", 42 "printing", 43 "proc-macro", 44 "quote", 45 "visit", 46 "visit-mut", 47 ], 48 edition = "2021", 49 deps = [ 50 # This should map to repo checked out from Android third party project 51 # "platform/external/rust/crates/proc-macro2". Similar for the rest of the dependencies 52 # below. 53 "@proc-macro2", 54 # Map to project repo "platform/external/rust/crates/quote". 55 "@quote", 56 # Map to project repo "platform/external/rust/crates/unicode-ident". 57 "@unicode-ident", 58 ], 59) 60