Revert^2 "libvm_payload: Use Rust stubs instead of cc"

This reverts commit ca685fb8a7cf387a21fe9d14964e7176330a2092.

Reason for revert: Accompanying build CL no longer builds the coverage variant for stubs

Change-Id: Ib975befa6d9ca86f1a7fc791078dfac896cb99e3
diff --git a/libs/libvm_payload/Android.bp b/libs/libvm_payload/Android.bp
index 1ebbe39..0d99113 100644
--- a/libs/libvm_payload/Android.bp
+++ b/libs/libvm_payload/Android.bp
@@ -3,11 +3,10 @@
 }
 
 // The Rust implementation of the C API.
-rust_ffi_static {
-    name: "libvm_payload_impl",
+rust_ffi {
+    name: "libvm_payload",
     crate_name: "vm_payload",
     defaults: ["avf_build_flags_rust"],
-    visibility: ["//visibility:private"],
     srcs: ["src/lib.rs"],
     include_dirs: ["include"],
     prefer_rlib: true,
@@ -23,6 +22,20 @@
         "libvm_payload_status_bindgen",
         "libvsock",
     ],
+    shared_libs: [
+        "libbinder_ndk",
+        "libbinder_rpc_unstable",
+        "liblog",
+        "libcrypto",
+    ],
+    no_full_install: true,
+    version_script: "libvm_payload.map.txt",
+    stubs: {
+        symbol_file: "libvm_payload.map.txt",
+        // Implementation is available inside a Microdroid VM.
+        implementation_installable: false,
+    },
+    visibility: ["//visibility:public"],
 }
 
 rust_bindgen {
@@ -76,28 +89,6 @@
     visibility: ["//visibility:public"],
 }
 
-// Shared library for clients to link against.
-cc_library_shared {
-    name: "libvm_payload",
-    defaults: ["avf_build_flags_cc"],
-    shared_libs: [
-        "libbinder_ndk",
-        "libbinder_rpc_unstable",
-        "liblog",
-        "libcrypto",
-    ],
-    whole_static_libs: ["libvm_payload_impl"],
-    export_static_lib_headers: ["libvm_payload_impl"],
-    no_full_install: true,
-    version_script: "libvm_payload.map.txt",
-    stubs: {
-        symbol_file: "libvm_payload.map.txt",
-        // Implementation is available inside a Microdroid VM.
-        implementation_installable: false,
-    },
-    visibility: ["//visibility:public"],
-}
-
 // Just the headers. Mostly useful for clients that only want the
 // declaration of AVmPayload_main().
 cc_library_headers {