xref: /aosp_15_r20/system/authgraph/wire/Android.bp (revision 4185b0660fbe514985fdcf75410317caad8afad1)
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_team: "trendy_team_android_hardware_backed_security",
17    default_applicable_licenses: ["system_authgraph_license"],
18}
19
20rust_library {
21    name: "libauthgraph_wire",
22    crate_name: "authgraph_wire",
23    srcs: ["src/lib.rs"],
24    host_supported: true,
25    vendor_available: true,
26    edition: "2021",
27    lints: "android",
28    rustlibs: [
29        "libciborium",
30        "libciborium_io",
31    ],
32    proc_macros: [
33        "libauthgraph_derive",
34        "libenumn",
35    ],
36}
37
38// _nostd variant of the build target, to help vendors who use Soong to
39// build for their secure environments.
40rust_library_rlib {
41    name: "libauthgraph_wire_nostd",
42    crate_name: "authgraph_wire",
43    srcs: ["src/lib.rs"],
44    vendor_available: true,
45    edition: "2021",
46    lints: "android",
47    rustlibs: [
48        "libciborium_nostd",
49        "libciborium_io_nostd",
50    ],
51    proc_macros: [
52        "libauthgraph_derive",
53        "libenumn",
54    ],
55    prefer_rlib: true,
56    no_stdlibs: true,
57    stdlibs: [
58        "libcompiler_builtins.rust_sysroot",
59        "libcore.rust_sysroot",
60    ],
61}
62
63rust_test {
64    name: "libauthgraph_wire_test",
65    crate_name: "authgraph_wire_test",
66    srcs: ["src/lib.rs"],
67    host_supported: true,
68    rustlibs: [
69        "libciborium",
70        "libciborium_io",
71        "libhex",
72    ],
73    proc_macros: [
74        "libauthgraph_derive",
75        "libenumn",
76    ],
77    test_suites: ["general-tests"],
78}
79