blob: bd08bc8532693178d83df4f7218414f17f67e98c [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: [
Shawn Willden708744a2020-12-11 13:05:27 +000021 "android.hardware.security.keymint-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080022 "android.security.apc-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070023 "android.security.compat-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080024 "android.system.keystore2-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070025 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070026 "libbinder_rs",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080027 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080028 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070029 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070030 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000031 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000032 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070033 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070034 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070035 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070036 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070037 "libthiserror",
38 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000039}
40
41rust_test {
42 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070043 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000044 srcs: ["src/lib.rs"],
Joel Galenson3f78dd82021-01-20 16:21:30 -080045 test_suites: ["general-tests"],
46 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070047 rustlibs: [
Shawn Willden708744a2020-12-11 13:05:27 +000048 "android.hardware.security.keymint-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080049 "android.security.apc-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070050 "android.security.compat-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080051 "android.system.keystore2-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070052 "android.hardware.security.keymint-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070053 "libandroid_logger",
54 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070055 "libbinder_rs",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080056 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080057 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070058 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070059 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000060 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000061 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070062 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070063 "liblog_rust",
Janis Danisevskisbf15d732020-12-08 10:35:26 -080064 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070065 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070066 "libthiserror",
67 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000068}
Janis Danisevskis652f3812020-08-04 00:01:12 +000069
Janis Danisevskis1af91262020-08-10 14:58:08 -070070rust_binary {
71 name: "keystore2",
72 srcs: ["src/keystore2_main.rs"],
73 rustlibs: [
74 "libandroid_logger",
75 "libbinder_rs",
76 "libkeystore2",
77 "liblog_rust",
78 ],
79 init_rc: ["keystore2.rc"],
80}