1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_ffi_static {
6    name: "libvmbase_example",
7    defaults: ["vmbase_ffi_defaults"],
8    crate_name: "vmbase_example",
9    srcs: ["src/main.rs"],
10    rustlibs: [
11        "libaarch64_paging",
12        "libcstr",
13        "libdiced_open_dice_nostd",
14        "libfdtpci",
15        "liblibfdt",
16        "liblog_rust_nostd",
17        "libvirtio_drivers",
18        "libvmbase",
19    ],
20}
21
22cc_binary {
23    name: "vmbase_example",
24    defaults: ["vmbase_elf_defaults"],
25    srcs: [
26        "idmap.S",
27    ],
28    static_libs: [
29        "libvmbase_example",
30    ],
31    linker_scripts: [
32        "image.ld",
33        ":vmbase_sections",
34    ],
35}
36
37raw_binary {
38    name: "vmbase_example_bin",
39    stem: "vmbase_example.bin",
40    src: ":vmbase_example",
41    enabled: false,
42    target: {
43        android_arm64: {
44            enabled: true,
45        },
46    },
47}
48
49rust_test {
50    name: "vmbase_example.integration_test",
51    crate_name: "vmbase_example_test",
52    srcs: ["tests/test.rs"],
53    prefer_rlib: true,
54    edition: "2021",
55    rustlibs: [
56        "android.system.virtualizationservice-rust",
57        "libandroid_logger",
58        "libanyhow",
59        "liblibc",
60        "liblog_rust",
61        "libnix",
62        "libvmclient",
63    ],
64    data: [
65        ":vmbase_example_bin",
66    ],
67    test_suites: ["general-tests"],
68    enabled: false,
69    target: {
70        android_arm64: {
71            enabled: true,
72        },
73    },
74}
75