• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023, 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_secretkeeper_license"],
17}
18
19rust_defaults {
20    name: "libsecretkeeper_core_defaults",
21    lints: "android",
22    vendor_available: true,
23    defaults: [
24        "authgraph_use_latest_hal_aidl_rust",
25        "secretkeeper_use_latest_hal_aidl_rust",
26    ],
27    rustlibs: [
28        // TODO(b/315464358): Use no_std version of authgraph_core/authgraph_wire/coset
29        "libauthgraph_core",
30        "libauthgraph_wire",
31        "libciborium",
32        "libcoset",
33        "libdice_policy",
34        "liblog_rust",
35        "libsecretkeeper_comm_nostd",
36    ],
37}
38
39rust_library {
40    name: "libsecretkeeper_core_nostd",
41    crate_name: "secretkeeper_core",
42    srcs: ["src/lib.rs"],
43    defaults: [
44        "libsecretkeeper_core_defaults",
45    ],
46    no_stdlibs: true,
47}
48
49rust_test {
50    name: "libsecretkeeper_core_test",
51    crate_name: "secretkeeper_core_test",
52    srcs: ["src/lib.rs"],
53    defaults: [
54        "libsecretkeeper_core_defaults",
55    ],
56    rustlibs: [
57        "libhex",
58    ],
59    test_suites: ["general-tests"],
60}
61