summaryrefslogtreecommitdiff
path: root/CC/proto/RULES
blob: 89d1e3443946b237f8148de738be5914c303d83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{ "library":
  { "doc":
    [ "A library C++ library, generated from proto files."
    , ""
    , "This rule usually is used to bind anonymous targets generated from"
    , "proto libraries."
    ]
  , "string_fields": ["name", "stage"]
  , "target_fields": ["srcs", "deps"]
  , "config_vars":
    ["OS", "ARCH", "HOST_ARCH", "CXX", "CXXFLAGS", "ADD_CXXFLAGS", "AR", "ENV"]
  , "implicit":
    { "protoc": [["@", "protoc", "", "protoc"]]
    , "defaults": [["./", "..", "defaults"]]
    , "proto-deps": [["@", "protoc", "", "libprotobuf"]]
    }
  , "imports":
    { "protoc-compile": "protoc-compile"
    , "host transition": ["transitions", "for host"]
    }
  , "config_transitions":
    {"protoc": [{"type": "CALL_EXPRESSION", "name": "host transition"}]}
  , "expression":
    { "type": "let*"
    , "bindings":
      [ ["name", {"type": "join", "$1": {"type": "FIELD", "name": "name"}}]
      , [ "stage"
        , { "type": "join"
          , "separator": "/"
          , "$1": {"type": "FIELD", "name": "stage"}
          }
        ]
      , [ "deps-transition"
        , {"type": "CALL_EXPRESSION", "name": "host transition"}
        ]
      , ["public-fieldnames", ["deps", "proto-deps"]]
      , ["private-fieldnames", ["deps", "proto-deps"]]
      ]
    , "body": {"type": "CALL_EXPRESSION", "name": "protoc-compile"}
    }
  }
, "service library":
  { "doc":
    [ "A service library C++ library, generated from proto files."
    , ""
    , "Calls protoc with gRPC plugin to additionally generate gRPC services"
    , "from proto libraries."
    ]
  , "string_fields": ["name", "stage"]
  , "target_fields": ["srcs", "deps"]
  , "config_vars":
    ["OS", "ARCH", "HOST_ARCH", "CXX", "CXXFLAGS", "ADD_CXXFLAGS", "AR", "ENV"]
  , "implicit":
    { "protoc": [["@", "protoc", "", "protoc"]]
    , "grpc_cpp_plugin": [["@", "grpc", "", "grpc_cpp_plugin"]]
    , "defaults": [["./", "..", "defaults"]]
    , "proto-deps":
      [["@", "grpc", "", "grpc++"], ["@", "protoc", "", "libprotobuf"]]
    }
  , "imports":
    { "protoc-compile": "protoc-compile"
    , "host transition": ["transitions", "for host"]
    }
  , "config_transitions":
    { "protoc": [{"type": "CALL_EXPRESSION", "name": "host transition"}]
    , "grpc_cpp_plugin":
      [{"type": "CALL_EXPRESSION", "name": "host transition"}]
    }
  , "expression":
    { "type": "let*"
    , "bindings":
      [ ["service support", true]
      , ["name", {"type": "join", "$1": {"type": "FIELD", "name": "name"}}]
      , [ "stage"
        , { "type": "join"
          , "separator": "/"
          , "$1": {"type": "FIELD", "name": "stage"}
          }
        ]
      , [ "deps-transition"
        , {"type": "CALL_EXPRESSION", "name": "host transition"}
        ]
      , ["public-fieldnames", ["deps", "proto-deps"]]
      , ["private-fieldnames", ["deps", "proto-deps"]]
      ]
    , "body": {"type": "CALL_EXPRESSION", "name": "protoc-compile"}
    }
  }
}