• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2022, 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: ["system_keymint_license"],
17}
18
19rust_defaults {
20    name: "kmr_hal_defaults",
21    edition: "2021",
22    lints: "vendor",
23    defaults: [
24        "keymint_use_latest_hal_aidl_rust",
25    ],
26    rustlibs: [
27        "android.hardware.security.rkp-V3-rust",
28        "android.hardware.security.secureclock-V1-rust",
29        "android.hardware.security.sharedsecret-V1-rust",
30        "libbinder_rs",
31        "libciborium",
32        "libciborium_io",
33        "libhex",
34        "libkmr_wire",
35        "liblog_rust",
36        "libregex",
37        "librustutils",
38    ],
39    proc_macros: [
40        "libkmr_derive",
41    ],
42}
43
44rust_library {
45    name: "libkmr_hal",
46    crate_name: "kmr_hal",
47    srcs: ["src/lib.rs"],
48    vendor_available: true,
49    defaults: [
50        "kmr_hal_defaults",
51    ],
52}
53
54rust_test {
55    name: "libkmr_hal_test",
56    crate_name: "libkeymint_rust_test",
57    srcs: ["src/lib.rs"],
58    defaults: [
59        "kmr_hal_defaults",
60    ],
61    test_suites: ["general-tests"],
62}
63