• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1rust_library(
2    name = "cxx",
3    srcs = glob(["src/**"]),
4    visibility = ["PUBLIC"],
5    deps = [
6        ":core",
7        ":macro",
8    ],
9)
10
11rust_binary(
12    name = "codegen",
13    srcs = glob(["gen/cmd/src/**"]),
14    crate = "cxxbridge",
15    visibility = ["PUBLIC"],
16    deps = [
17        "//third-party:clap",
18        "//third-party:codespan-reporting",
19        "//third-party:proc-macro2",
20        "//third-party:quote",
21        "//third-party:syn",
22    ],
23)
24
25cxx_library(
26    name = "core",
27    srcs = ["src/cxx.cc"],
28    visibility = ["PUBLIC"],
29    header_namespace = "rust",
30    exported_headers = {
31        "cxx.h": "include/cxx.h",
32    },
33    exported_linker_flags = ["-lstdc++"],
34)
35
36rust_library(
37    name = "macro",
38    srcs = glob(["macro/src/**"]),
39    proc_macro = True,
40    crate = "cxxbridge_macro",
41    deps = [
42        "//third-party:proc-macro2",
43        "//third-party:quote",
44        "//third-party:syn",
45    ],
46)
47
48rust_library(
49    name = "build",
50    srcs = glob(["gen/build/src/**"]),
51    visibility = ["PUBLIC"],
52    deps = [
53        "//third-party:cc",
54        "//third-party:codespan-reporting",
55        "//third-party:lazy_static",
56        "//third-party:proc-macro2",
57        "//third-party:quote",
58        "//third-party:scratch",
59        "//third-party:syn",
60    ],
61)
62
63rust_library(
64    name = "lib",
65    srcs = glob(["gen/lib/src/**"]),
66    visibility = ["PUBLIC"],
67    deps = [
68        "//third-party:cc",
69        "//third-party:codespan-reporting",
70        "//third-party:proc-macro2",
71        "//third-party:quote",
72        "//third-party:syn",
73    ],
74)
75