• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2022 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20rust_protobuf {
21    name: "libkmr_proto_rust",
22    crate_name: "kmr_proto",
23    protos: ["storage.proto"],
24    source_stem: "kmr_proto",
25    host_supported: true,
26}
27
28rust_library_host {
29    name: "libkmr_cf",
30    srcs: ["lib.rs"],
31    crate_name: "kmr_cf",
32    rustlibs: [
33        "libhex",
34        "libkmr_common",
35        "libkmr_crypto_boring",
36        "libkmr_proto_rust",
37        "libkmr_ta",
38        "libkmr_ta_nonsecure",
39        "libkmr_wire",
40        "liblibc",
41        "liblog_rust",
42        "libnix",
43        "libprotobuf",
44        "libsecure_env_tpm",
45    ],
46    defaults: ["cuttlefish_buildhost_only"],
47}
48
49rust_ffi_host {
50    name: "libkmr_cf_ffi",
51    compile_multilib: "64",
52    srcs: ["ffi.rs"],
53    crate_name: "kmr_cf_ffi",
54    rustlibs: [
55        "libkmr_cf",
56        "libkmr_wire",
57        "liblibc",
58        "liblog_rust",
59    ],
60    prefer_rlib: true,
61    defaults: ["cuttlefish_buildhost_only"],
62}
63
64rust_test_host {
65    name: "libkmr_cf_test",
66    srcs: ["lib.rs"],
67    rustlibs: [
68        "libhex",
69        "libkmr_common",
70        "libkmr_crypto_boring",
71        "libkmr_proto_rust",
72        "libkmr_ta",
73        "libkmr_ta_nonsecure",
74        "libkmr_tests",
75        "libkmr_wire",
76        "liblibc",
77        "liblog_rust",
78        "libnix",
79        "libprotobuf",
80        "libsecure_env_tpm",
81    ],
82    defaults: ["cuttlefish_buildhost_only"],
83    test_suites: ["general-tests"],
84}
85