1// 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 17 // 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 34rust_defaults { 35 name: "prng_seeder_defaults", 36 edition: "2021", 37 rustlibs: [ 38 "libanyhow", 39 "libbssl_ffi", 40 "libclap", 41 "libcutils_socket_bindgen", 42 "liblogger", 43 "liblog_rust", 44 "libnix", 45 "libtokio", 46 ], 47 48 init_rc: ["prng_seeder.rc"], 49} 50 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} 66 67rust_test { 68 name: "prng_seeder.test", 69 edition: "2021", 70 srcs: ["src/main.rs"], 71 rustlibs: [ 72 "libanyhow", 73 "libbssl_ffi", 74 "libclap", 75 "libcutils_socket_bindgen", 76 "liblogger", 77 "liblog_rust", 78 "libnix", 79 "libtokio", 80 ], 81 test_suites: ["general-tests"], 82} 83