File tree 3 files changed +64
-0
lines changed
3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ load ("//:aprotoc.bzl" , "aprotoc" )
2
+
3
+ aprotoc (
4
+ name = "arpc_protocol" ,
5
+ src = "src/arpc_protocol.proto" ,
6
+ )
7
+
8
+ aprotoc (
9
+ name = "server_test_proto" ,
10
+ src = "src/server_test_proto.proto" ,
11
+ )
12
+
13
+ cc_library (
14
+ name = "arpc" ,
15
+ srcs = [
16
+ "src/argdata_builder.cc" ,
17
+ "src/argdata_parser.cc" ,
18
+ "src/channel.cc" ,
19
+ "src/client_reader_impl.cc" ,
20
+ "src/client_writer_impl.cc" ,
21
+ "src/server.cc" ,
22
+ "src/server_reader_impl.cc" ,
23
+ "src/server_writer_impl.cc" ,
24
+ "src/status.cc" ,
25
+ "src/status_code.cc" ,
26
+ ":arpc_protocol" ,
27
+ ],
28
+ hdrs = ["include/arpc++/arpc++.h" ],
29
+ strip_include_prefix = "include" ,
30
+ visibility = ["//visibility:public" ],
31
+ deps = ["@com_github_nuxinl_argdata//:argdata" ],
32
+ )
33
+
34
+ # TODO(ed): Add logic to disable SIGPIPE to make this test pass.
35
+ cc_test (
36
+ name = "arpc_test" ,
37
+ srcs = [
38
+ "src/server_test.cc" ,
39
+ ":server_test_proto" ,
40
+ ],
41
+ deps = [
42
+ "//:arpc" ,
43
+ "@com_google_googletest//:gtest_main" ,
44
+ ],
45
+ )
Original file line number Diff line number Diff line change
1
+ def aprotoc (name , src ):
2
+ native .genrule (
3
+ name = name ,
4
+ srcs = [src ],
5
+ outs = [name + ".ad.h" ],
6
+ cmd = "./$(location @com_github_nuxinl_arpc//scripts:aprotoc) < $(location %s) > $@" % src ,
7
+ tools = ["@com_github_nuxinl_arpc//scripts:aprotoc" ],
8
+ )
Original file line number Diff line number Diff line change
1
+ load ("@aprotoc_deps//:requirements.bzl" , "requirement" )
2
+
3
+ py_binary (
4
+ name = "aprotoc" ,
5
+ srcs = ["aprotoc.py" ],
6
+ visibility = ["//visibility:public" ],
7
+ deps = [
8
+ requirement ("pyPEG2" ),
9
+ requirement ("toposort" ),
10
+ ],
11
+ )
You can’t perform that action at this time.
0 commit comments