1// 2// Copyright (C) 2022 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20rust_protobuf { 21 name: "libkmr_proto_rust", 22 crate_name: "kmr_proto", 23 protos: ["storage.proto"], 24 source_stem: "kmr_proto", 25 host_supported: true, 26} 27 28rust_library_host { 29 name: "libkmr_cf", 30 srcs: ["lib.rs"], 31 crate_name: "kmr_cf", 32 rustlibs: [ 33 "libhex", 34 "libkmr_common", 35 "libkmr_crypto_boring", 36 "libkmr_proto_rust", 37 "libkmr_ta", 38 "libkmr_ta_nonsecure", 39 "libkmr_wire", 40 "liblibc", 41 "liblog_rust", 42 "libnix", 43 "libprotobuf", 44 "libsecure_env_tpm", 45 ], 46 defaults: ["cuttlefish_buildhost_only"], 47} 48 49rust_ffi_host { 50 name: "libkmr_cf_ffi", 51 compile_multilib: "64", 52 srcs: ["ffi.rs"], 53 crate_name: "kmr_cf_ffi", 54 rustlibs: [ 55 "libkmr_cf", 56 "libkmr_wire", 57 "liblibc", 58 "liblog_rust", 59 ], 60 defaults: ["cuttlefish_buildhost_only"], 61} 62 63rust_test_host { 64 name: "libkmr_cf_test", 65 srcs: ["lib.rs"], 66 rustlibs: [ 67 "libhex", 68 "libkmr_common", 69 "libkmr_crypto_boring", 70 "libkmr_proto_rust", 71 "libkmr_ta", 72 "libkmr_ta_nonsecure", 73 "libkmr_tests", 74 "libkmr_wire", 75 "liblibc", 76 "liblog_rust", 77 "libnix", 78 "libprotobuf", 79 "libsecure_env_tpm", 80 ], 81 defaults: ["cuttlefish_buildhost_only"], 82 test_suites: ["general-tests"], 83} 84