blob: 3c8179f0397edd001e10b58aad1081eed6b56c72 [file] [log] [blame]
Paul Crowley9da969e2022-09-16 23:42:24 +00001// Copyright (C) 2022 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://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,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16 // See: http://go/android-license-faq
Paul Crowley9da969e2022-09-16 23:42:24 +000017 // SPDX-license-identifier-Apache-2.0
18 default_applicable_licenses: ["system_security_license"],
19}
20
21rust_bindgen {
22 name: "libcutils_socket_bindgen",
23 crate_name: "cutils_socket_bindgen",
24 wrapper_src: "cutils_wrapper.h",
25 source_stem: "bindings",
26 bindgen_flags: [
27 "--allowlist-function=android_get_control_socket",
28 ],
29 shared_libs: [
30 "libcutils",
31 ],
32}
33
Jiyong Parkeefd3512022-12-22 10:22:57 +090034rust_defaults {
35 name: "prng_seeder_defaults",
Paul Crowley9da969e2022-09-16 23:42:24 +000036 edition: "2021",
Paul Crowley9da969e2022-09-16 23:42:24 +000037 rustlibs: [
38 "libanyhow",
Maurice Lam47b4fac2023-12-18 22:14:32 +000039 "libbssl_sys",
Paul Crowley9da969e2022-09-16 23:42:24 +000040 "libclap",
41 "libcutils_socket_bindgen",
42 "liblogger",
43 "liblog_rust",
44 "libnix",
45 "libtokio",
46 ],
Pete Bentley812307d2022-09-22 15:29:13 +010047
48 init_rc: ["prng_seeder.rc"],
Paul Crowley9da969e2022-09-16 23:42:24 +000049}
Jiyong Parkeefd3512022-12-22 10:22:57 +090050
51rust_binary {
52 name: "prng_seeder",
53 defaults: ["prng_seeder_defaults"],
54 srcs: ["src/main.rs"],
55}
56
57rust_binary {
58 name: "prng_seeder_microdroid",
59 defaults: ["prng_seeder_defaults"],
60 srcs: ["src/main.rs"],
61 stem: "prng_seeder",
62 bootstrap: true,
63 installable: false,
64 prefer_rlib: true,
65}
Andrew Walbran13335de2022-12-01 15:05:39 +000066
67rust_test {
68 name: "prng_seeder.test",
69 edition: "2021",
70 srcs: ["src/main.rs"],
71 rustlibs: [
72 "libanyhow",
Maurice Lam47b4fac2023-12-18 22:14:32 +000073 "libbssl_sys",
Andrew Walbran13335de2022-12-01 15:05:39 +000074 "libclap",
75 "libcutils_socket_bindgen",
76 "liblogger",
77 "liblog_rust",
78 "libnix",
79 "libtokio",
80 ],
81 test_suites: ["general-tests"],
82}