1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ load ("@cxx.rs//tools/bazel:rust_cxx_bridge.bzl" , "rust_cxx_bridge" )
16+ load ("@rules_cc//cc:cc_library.bzl" , "cc_library" )
17+ load ("@rules_cc//cc:cc_test.bzl" , "cc_test" )
1518load ("@rules_rust//rust:defs.bzl" , "rust_library" , "rust_test" )
1619
1720package (
1821 default_applicable_licenses = [
1922 ],
20- default_visibility = ["//visibility:public " ],
23+ default_visibility = ["//:internal " ],
2124)
2225
2326# PRNG
@@ -71,7 +74,6 @@ rust_library(
7174 "//shell_wrapper:status" ,
7275 "//willow/src/api:aggregation_config" ,
7376 "//willow/src/shell:kahe_shell" ,
74- "//willow/src/shell:single_thread_hkdf" ,
7577 "//willow/src/shell:vahe_shell" ,
7678 "//willow/src/traits:ahe_traits" ,
7779 "//willow/src/traits:kahe_traits" ,
@@ -90,16 +92,28 @@ rust_test(
9092 ],
9193)
9294
95+ rust_cxx_bridge (
96+ name = "shell_testing_decryptor_cxx" ,
97+ src = "shell_testing_decryptor.rs" ,
98+ deps = [
99+ ":shell_testing_decryptor" ,
100+ ],
101+ )
102+
93103rust_library (
94104 name = "shell_testing_decryptor" ,
95- testonly = 1 ,
96105 srcs = [
97106 "shell_testing_decryptor.rs" ,
98107 ],
99108 deps = [
100- ":shell_testing_parameters" ,
109+ "@protobuf//rust:protobuf" ,
110+ "@cxx.rs//:cxx" ,
111+ "//shell_wrapper:shell_types_cc" ,
101112 "//shell_wrapper:status" ,
113+ "//willow/proto/willow:aggregation_config_rust_proto" ,
114+ "//willow/proto/willow:messages_rust_proto" ,
102115 "//willow/src/api:aggregation_config" ,
116+ "//willow/src/shell:ahe_shell" ,
103117 "//willow/src/shell:kahe_shell" ,
104118 "//willow/src/shell:parameters_shell" ,
105119 "//willow/src/shell:single_thread_hkdf" ,
@@ -108,6 +122,35 @@ rust_library(
108122 "//willow/src/traits:kahe_traits" ,
109123 "//willow/src/traits:messages" ,
110124 "//willow/src/traits:prng_traits" ,
125+ "//willow/src/traits:proto_serialization_traits" ,
111126 "//willow/src/traits:vahe_traits" ,
112127 ],
113128)
129+
130+ cc_library (
131+ name = "shell_testing_decryptor_cc" ,
132+ srcs = ["shell_testing_decryptor.cc" ],
133+ hdrs = ["shell_testing_decryptor.h" ],
134+ deps = [
135+ ":shell_testing_decryptor_cxx" ,
136+ "@abseil-cpp//absl/memory" ,
137+ "@abseil-cpp//absl/status" ,
138+ "@abseil-cpp//absl/status:statusor" ,
139+ "//shell_wrapper:shell_types_cc" ,
140+ "//willow/proto/shell:shell_ciphertexts_cc_proto" ,
141+ "//willow/proto/willow:aggregation_config_cc_proto" ,
142+ "//willow/proto/willow:messages_cc_proto" ,
143+ "//willow/src/input_encoding:codec" ,
144+ ],
145+ )
146+
147+ cc_test (
148+ name = "shell_testing_decryptor_test" ,
149+ srcs = ["shell_testing_decryptor_test.cc" ],
150+ deps = [
151+ ":shell_testing_decryptor_cc" ,
152+ "@googletest//:gtest_main" ,
153+ "//shell_wrapper:status_matchers" ,
154+ "//willow/proto/willow:aggregation_config_cc_proto" ,
155+ ],
156+ )
0 commit comments