1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21rust_defaults {
22    name: "libsecretkeeper_comm.defaults",
23    crate_name: "secretkeeper_comm",
24    defaults: ["avf_build_flags_rust"],
25    edition: "2021",
26    lints: "android",
27    rustlibs: [
28        "libciborium",
29        "libcoset",
30        "libzeroize",
31    ],
32    proc_macros: ["libenumn"],
33    vendor_available: true,
34}
35
36rust_library {
37    name: "libsecretkeeper_comm_nostd",
38    defaults: ["libsecretkeeper_comm.defaults"],
39    srcs: ["src/lib.rs"],
40}
41
42rust_test {
43    name: "libsecretkeeper_comm.test",
44    defaults: [
45        "libsecretkeeper_comm.defaults",
46        "rdroidtest.defaults",
47    ],
48    srcs: ["tests/tests.rs"],
49    test_suites: ["general-tests"],
50    rustlibs: [
51        "libsecretkeeper_comm_nostd",
52    ],
53}
54