Introduce Soong target libmemoffset_nostd am: 46edeb14c3 am: 03a37ce18a

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/memoffset/+/2952669

Change-Id: I6edaf6118f480460acedf907e6d18c10b332778e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index b617d11..6aec059 100644
--- a/Android.bp
+++ b/Android.bp
@@ -69,3 +69,34 @@
         "aosp_force_use_std",
     ],
 }
+
+rust_library_rlib {
+    name: "libmemoffset_nostd",
+    crate_name: "memoffset",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.9.0",
+    srcs: ["src/lib.rs"],
+    edition: "2018",
+    features: ["default"],
+    cfgs: [
+        "allow_clippy",
+        "doctests",
+        "maybe_uninit",
+        "raw_ref_macros",
+        "stable_const",
+        "tuple_ty",
+    ],
+    apex_available: [
+        "//apex_available:platform",
+        "//apex_available:anyapex",
+    ],
+    prefer_rlib: true,
+    no_stdlibs: true,
+    stdlibs: [
+        "liballoc.rust_sysroot",
+        "libcompiler_builtins.rust_sysroot",
+        "libcore.rust_sysroot",
+    ],
+    product_available: true,
+    vendor_available: true,
+}
diff --git a/cargo_embargo.json b/cargo_embargo.json
index 0ff27f0..a503b0a 100644
--- a/cargo_embargo.json
+++ b/cargo_embargo.json
@@ -13,6 +13,19 @@
         "aosp_force_use_std"
       ],
       "tests": true
+    },
+    {
+      "module_name_overrides": {
+        "libmemoffset": "libmemoffset_nostd"
+      },
+      "package": {
+        "memoffset": {
+          "alloc": true,
+          "force_rlib": true,
+          "host_supported": false,
+          "no_std": true
+        }
+      }
     }
   ]
 }