• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2024 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
15rust_defaults {
16    name: "libminikin_rust_defaults",
17    crate_name: "minikin",
18    srcs: ["minikin.rs"],
19    host_supported: true,
20    rustlibs: [
21        "libcxx",
22        "liblogger",
23        "liblog_rust",
24    ],
25    whole_static_libs: [
26        "libminikin_from_rust_to_cpp",
27    ],
28    shared_libs: [
29        "libbase",
30    ],
31}
32
33rust_ffi_static {
34    name: "libminikin_rust_ffi",
35    defaults: ["libminikin_rust_defaults"],
36}
37
38genrule {
39    name: "libminikin_cxx_bridge_code",
40    tools: ["cxxbridge"],
41    cmd: "$(location cxxbridge) $(in) >> $(out)",
42    srcs: ["minikin.rs"],
43    out: ["minikin_cxx_bridge_generated.cpp"],
44}
45
46genrule {
47    name: "libminikin_cxx_bridge_header",
48    tools: ["cxxbridge"],
49    cmd: "$(location cxxbridge) $(in) --header >> $(out)",
50    srcs: ["minikin.rs"],
51    out: ["minikin_cxx_bridge.rs.h"],
52}
53