blob: f1173e001c7efc9c62284008b85e667292bf1fc6 [file] [log] [blame]
Janis Danisevskis43c89712020-08-03 23:42:42 +00001// Copyright 2020, 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
15rust_library {
16 name: "libkeystore2",
17 crate_name: "keystore2",
18 srcs: ["src/lib.rs"],
Janis Danisevskis7d77a762020-07-20 13:03:31 -070019
20 rustlibs: [
21 "libanyhow",
Hasini Gunasingheaf993662020-07-24 18:40:20 +000022 "libandroid_hardware_keymint",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070023 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070024 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000025 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070026 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070027 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070028 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070029 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070030 "libthiserror",
31 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000032}
33
34rust_test {
35 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070036 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000037 srcs: ["src/lib.rs"],
38 test_suites: ["general-tests"],
39 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070040 rustlibs: [
41 "libandroid_logger",
42 "libanyhow",
Hasini Gunasingheaf993662020-07-24 18:40:20 +000043 "libandroid_hardware_keymint",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070044 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070045 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000046 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070047 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070048 "liblog_rust",
Joel Galenson26f4d012020-07-17 14:57:21 -070049 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070050 "libthiserror",
51 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000052}
Janis Danisevskis652f3812020-08-04 00:01:12 +000053
54// This is a placeholder for the libraries that will be generated from the AIDL specs
55// eventually.
56rust_library {
57 name: "libkeystore_aidl_generated",
58 crate_name: "keystore_aidl_generated",
59
60 srcs: ["src/aidl_generated.rs"],
61}
Janis Danisevskis1fe11322020-08-07 08:44:08 -070062
63// This is a placeholder for the libraries that will be generated from the AIDL specs
64// eventually.
65rust_library {
66 name: "libandroid_hardware_keymint",
67 crate_name: "android_hardware_keymint",
68
69 srcs: ["src/android_hardware_keymint.rs"],
70
71 rustlibs: [
72 "libbinder_rs",
73 "liblazy_static",
74 ],
75}
76
77// This is a placeholder for the libraries that will be generated from the AIDL specs
78// eventually.
79rust_library {
80 name: "libandroid_security_keystore2",
81 crate_name: "android_security_keystore2",
82
83 srcs: ["src/android_security_keystore2.rs"],
84
85 rustlibs: [
86 "libandroid_hardware_keymint",
87 "libbinder_rs",
88 "liblazy_static",
89 ],
90}