blob: e66d43600da497c86a0c1bfa68b82ce8c6c08433 [file] [log] [blame]
Janis Danisevskisc51dff82021-10-20 09:51:16 -07001// 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 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "system_security_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["system_security_license"],
22}
23
Alice Wangdb748d22023-09-19 11:18:29 +000024rust_defaults {
25 name: "libdiced_sample_inputs_defaults",
Janis Danisevskisc51dff82021-10-20 09:51:16 -070026 crate_name: "diced_sample_inputs",
Alice Wang4a3c97c2023-03-03 08:40:54 +000027 srcs: ["src/lib.rs"],
Alice Wangdb748d22023-09-19 11:18:29 +000028}
29
30rust_library {
31 name: "libdiced_sample_inputs",
32 defaults: ["libdiced_sample_inputs_defaults"],
33 features: [
34 "std",
35 ],
Janis Danisevskisc51dff82021-10-20 09:51:16 -070036 rustlibs: [
Alice Wang84dcbe12023-02-28 13:50:47 +000037 "libciborium",
38 "libcoset",
Alice Wang4d3059a2023-02-15 10:24:33 +000039 "libdiced_open_dice",
Alice Wangdb748d22023-09-19 11:18:29 +000040 "liblog_rust",
Janis Danisevskisc51dff82021-10-20 09:51:16 -070041 ],
42}
43
Alice Wangdb748d22023-09-19 11:18:29 +000044rust_library_rlib {
45 name: "libdiced_sample_inputs_nostd",
46 defaults: ["libdiced_sample_inputs_defaults"],
47 rustlibs: [
48 "libciborium_nostd",
49 "libcoset_nostd",
50 "libdiced_open_dice_nostd",
51 "liblog_rust_nostd",
52 ],
53 visibility: [
54 "//packages/modules/Virtualization:__subpackages__",
55 ],
56}
57
58rust_defaults {
59 name: "libdiced_sample_inputs_test_defaults",
60 crate_name: "diced_sample_inputs_test",
61 srcs: ["tests/*.rs"],
62 test_suites: ["general-tests"],
63}
64
Janis Danisevskisc51dff82021-10-20 09:51:16 -070065rust_test {
Alice Wang4a3c97c2023-03-03 08:40:54 +000066 name: "libdiced_sample_inputs.integration_test",
Alice Wangdb748d22023-09-19 11:18:29 +000067 defaults: ["libdiced_sample_inputs_test_defaults"],
Janis Danisevskisc51dff82021-10-20 09:51:16 -070068 rustlibs: [
Alice Wang4d3059a2023-02-15 10:24:33 +000069 "libdiced_open_dice",
Alice Wang4a3c97c2023-03-03 08:40:54 +000070 "libdiced_sample_inputs",
Janis Danisevskisc51dff82021-10-20 09:51:16 -070071 ],
72}
Alice Wangdb748d22023-09-19 11:18:29 +000073
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}