1# Copyright 2020 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load( 16 "//pw_build:pigweed.bzl", 17 "pw_cc_library", 18 "pw_cc_test", 19) 20 21package(default_visibility = ["//visibility:public"]) 22 23licenses(["notice"]) # Apache License 2.0 24 25pw_cc_library( 26 name = "method", 27 srcs = [ 28 "raw_method.cc", 29 ], 30 hdrs = [ 31 "public/pw_rpc/internal/raw_method.h", 32 ], 33 deps = [ 34 "//pw_bytes", 35 "//pw_rpc:server", 36 ], 37) 38 39pw_cc_library( 40 name = "method_union", 41 hdrs = [ 42 "public/pw_rpc/internal/raw_method_union.h", 43 ], 44 deps = [ 45 ":method", 46 ], 47) 48 49pw_cc_library( 50 name = "test_method_context", 51 hdrs = [ 52 "public/pw_rpc/raw_test_method_context.h", 53 ], 54 deps = [ 55 ":method_union", 56 "//pw_assert", 57 "//pw_containers", 58 ], 59) 60 61pw_cc_test( 62 name = "codegen_test", 63 srcs = [ 64 "codegen_test.cc", 65 ], 66 deps = [ 67 ":method_union", 68 "//pw_protobuf", 69 ], 70) 71 72pw_cc_test( 73 name = "raw_method_test", 74 srcs = [ 75 "raw_method_test.cc", 76 ], 77 deps = [ 78 ":method_union", 79 "//pw_protobuf", 80 "//pw_rpc:internal_test_utils", 81 ], 82) 83 84pw_cc_test( 85 name = "raw_method_union_test", 86 srcs = [ 87 "raw_method_union_test.cc", 88 ], 89 deps = [ 90 ":method_union", 91 "//pw_protobuf", 92 "//pw_rpc:internal_test_utils", 93 ], 94) 95 96pw_cc_test( 97 name = "stub_generation_test", 98 srcs = ["stub_generation_test.cc"], 99 # TODO(hepler): Figure out proto BUILD integration. 100 # deps = ["..:test_protos.raw_rpc"], 101) 102