1load( 2 "//tools/bazel:rust.bzl", 3 glob = "third_party_glob", 4 rust_library = "third_party_rust_library", 5) 6 7rust_library( 8 name = "bitflags", 9 srcs = glob(["vendor/bitflags-1.2.1/src/**"]), 10) 11 12rust_library( 13 name = "cc", 14 srcs = glob(["vendor/cc-1.0.67/src/**"]), 15 visibility = ["//visibility:public"], 16) 17 18rust_library( 19 name = "clap", 20 srcs = glob(["vendor/clap-2.33.3/src/**"]), 21 edition = "2015", 22 visibility = ["//visibility:public"], 23 deps = [ 24 ":bitflags", 25 ":textwrap", 26 ":unicode-width", 27 ], 28) 29 30rust_library( 31 name = "codespan-reporting", 32 srcs = glob(["vendor/codespan-reporting-0.11.1/src/**"]), 33 visibility = ["//visibility:public"], 34 deps = [ 35 ":termcolor", 36 ":unicode-width", 37 ], 38) 39 40rust_library( 41 name = "lazy_static", 42 srcs = glob(["vendor/lazy_static-1.4.0/src/**"]), 43 visibility = ["//visibility:public"], 44) 45 46rust_library( 47 name = "proc-macro2", 48 srcs = glob(["vendor/proc-macro2-1.0.26/src/**"]), 49 crate_features = [ 50 "proc-macro", 51 "span-locations", 52 ], 53 rustc_flags = [ 54 "--cfg=span_locations", 55 "--cfg=use_proc_macro", 56 "--cfg=wrap_proc_macro", 57 ], 58 visibility = ["//visibility:public"], 59 deps = [":unicode-xid"], 60) 61 62rust_library( 63 name = "quote", 64 srcs = glob(["vendor/quote-1.0.9/src/**"]), 65 crate_features = ["proc-macro"], 66 visibility = ["//visibility:public"], 67 deps = [":proc-macro2"], 68) 69 70rust_library( 71 name = "scratch", 72 srcs = glob(["vendor/scratch-1.0.0/src/**"]), 73 rustc_env = {"OUT_DIR": ""}, 74 visibility = ["//visibility:public"], 75) 76 77rust_library( 78 name = "syn", 79 srcs = glob(["vendor/syn-1.0.68/src/**"]), 80 crate_features = [ 81 "clone-impls", 82 "derive", 83 "full", 84 "parsing", 85 "printing", 86 "proc-macro", 87 ], 88 visibility = ["//visibility:public"], 89 deps = [ 90 ":proc-macro2", 91 ":quote", 92 ":unicode-xid", 93 ], 94) 95 96rust_library( 97 name = "termcolor", 98 srcs = glob(["vendor/termcolor-1.1.2/src/**"]), 99) 100 101rust_library( 102 name = "textwrap", 103 srcs = glob(["vendor/textwrap-0.11.0/src/**"]), 104 deps = [":unicode-width"], 105) 106 107rust_library( 108 name = "unicode-width", 109 srcs = glob(["vendor/unicode-width-0.1.8/src/**"]), 110) 111 112rust_library( 113 name = "unicode-xid", 114 srcs = glob(["vendor/unicode-xid-0.2.1/src/**"]), 115) 116