blob: 154b675ddb5e389de86f8df300388239c48ead72 [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",
22 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070023 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000024 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070025 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070026 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070027 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070028 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070029 "libthiserror",
30 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000031}
32
33rust_test {
34 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070035 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000036 srcs: ["src/lib.rs"],
37 test_suites: ["general-tests"],
38 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070039 rustlibs: [
40 "libandroid_logger",
41 "libanyhow",
42 "libkeystore_aidl_generated",
Janis Danisevskisce995432020-07-21 12:22:34 -070043 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000044 "liblazy_static",
Joel Galenson0891bc12020-07-20 10:37:03 -070045 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070046 "liblog_rust",
Joel Galenson26f4d012020-07-17 14:57:21 -070047 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070048 "libthiserror",
49 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000050}
Janis Danisevskis652f3812020-08-04 00:01:12 +000051
52// This is a placeholder for the libraries that will be generated from the AIDL specs
53// eventually.
54rust_library {
55 name: "libkeystore_aidl_generated",
56 crate_name: "keystore_aidl_generated",
57
58 srcs: ["src/aidl_generated.rs"],
59}
Janis Danisevskis1fe11322020-08-07 08:44:08 -070060
61// This is a placeholder for the libraries that will be generated from the AIDL specs
62// eventually.
63rust_library {
64 name: "libandroid_hardware_keymint",
65 crate_name: "android_hardware_keymint",
66
67 srcs: ["src/android_hardware_keymint.rs"],
68
69 rustlibs: [
70 "libbinder_rs",
71 "liblazy_static",
72 ],
73}
74
75// This is a placeholder for the libraries that will be generated from the AIDL specs
76// eventually.
77rust_library {
78 name: "libandroid_security_keystore2",
79 crate_name: "android_security_keystore2",
80
81 srcs: ["src/android_security_keystore2.rs"],
82
83 rustlibs: [
84 "libandroid_hardware_keymint",
85 "libbinder_rs",
86 "liblazy_static",
87 ],
88}