1// Copyright 2021, 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 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19rust_defaults { 20 name: "libdiced_sample_inputs_defaults", 21 crate_name: "diced_sample_inputs", 22 defaults: ["avf_build_flags_rust"], 23 srcs: ["src/lib.rs"], 24} 25 26rust_library { 27 name: "libdiced_sample_inputs", 28 defaults: ["libdiced_sample_inputs_defaults"], 29 features: [ 30 "std", 31 ], 32 rustlibs: [ 33 "libciborium", 34 "libcoset", 35 "libdiced_open_dice", 36 "liblog_rust", 37 ], 38} 39 40rust_library_rlib { 41 name: "libdiced_sample_inputs_nostd", 42 defaults: ["libdiced_sample_inputs_defaults"], 43 rustlibs: [ 44 "libciborium_nostd", 45 "libcoset_nostd", 46 "libdiced_open_dice_nostd", 47 "liblog_rust_nostd", 48 ], 49 visibility: [ 50 "//packages/modules/Virtualization:__subpackages__", 51 ], 52} 53 54rust_defaults { 55 name: "libdiced_sample_inputs_test_defaults", 56 crate_name: "diced_sample_inputs_test", 57 srcs: ["tests/api_test.rs"], 58 test_suites: ["general-tests"], 59 rustlibs: [ 60 "libanyhow", 61 "libhwtrust", 62 ], 63} 64 65rust_test { 66 name: "libdiced_sample_inputs.integration_test", 67 defaults: ["libdiced_sample_inputs_test_defaults"], 68 rustlibs: [ 69 "libdiced_open_dice", 70 "libdiced_sample_inputs", 71 ], 72} 73 74rust_test { 75 name: "libdiced_sample_inputs_nostd.integration_test", 76 defaults: ["libdiced_sample_inputs_test_defaults"], 77 rustlibs: [ 78 "libdiced_open_dice_nostd", 79 "libdiced_sample_inputs_nostd", 80 ], 81} 82