1package(
2    default_visibility = ["//visibility:private"],
3)
4
5load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
6
7# Public flatc library to compile flatbuffer files at runtime.
8cc_library(
9    name = "flatbuffers",
10    srcs = [
11        "code_generators.cpp",
12        "idl_gen_fbs.cpp",
13        "idl_gen_text.cpp",
14        "idl_parser.cpp",
15        "reflection.cpp",
16        "util.cpp",
17    ],
18    hdrs = ["//:public_headers"],
19    strip_include_prefix = "/include",
20    visibility = ["//:__pkg__"],
21)
22
23# Public flatc compiler library.
24cc_library(
25    name = "flatc_library",
26    srcs = [
27        "flatc.cpp",
28    ],
29    hdrs = [
30        "//:flatc_headers",
31    ],
32    strip_include_prefix = "/include",
33    visibility = ["//:__pkg__"],
34    deps = [
35        ":flatbuffers",
36    ],
37)
38
39# Public flatc compiler.
40cc_library(
41    name = "flatc",
42    srcs = [
43        "flatc_main.cpp",
44        "idl_gen_cpp.cpp",
45        "idl_gen_csharp.cpp",
46        "idl_gen_dart.cpp",
47        "idl_gen_go.cpp",
48        "idl_gen_grpc.cpp",
49        "idl_gen_java.cpp",
50        "idl_gen_js_ts.cpp",
51        "idl_gen_json_schema.cpp",
52        "idl_gen_kotlin.cpp",
53        "idl_gen_lobster.cpp",
54        "idl_gen_lua.cpp",
55        "idl_gen_php.cpp",
56        "idl_gen_python.cpp",
57        "idl_gen_rust.cpp",
58        "idl_gen_text.cpp",
59        "idl_gen_swift.cpp",
60        "util.cpp",
61    ],
62    hdrs = [
63        "//:flatc_headers",
64    ],
65    strip_include_prefix = "/include",
66    visibility = ["//:__pkg__"],
67    deps = [
68        ":flatc_library",
69        "//grpc/src/compiler:cpp_generator",
70        "//grpc/src/compiler:go_generator",
71        "//grpc/src/compiler:java_generator",
72        "//grpc/src/compiler:python_generator",
73        "//grpc/src/compiler:swift_generator",
74    ],
75)
76