Add alloc to _nostd variant

Bug: 303192701
Test: build both variants
Change-Id: I724d92d37fa553c84ef65c0e0ebd80672e7c829e
diff --git a/Android.bp b/Android.bp
index 157f1ab..e56d529 100644
--- a/Android.bp
+++ b/Android.bp
@@ -60,7 +60,10 @@
     cargo_pkg_version: "1.6.0",
     srcs: ["src/lib.rs"],
     edition: "2021",
-    features: ["zeroize_derive"],
+    features: [
+        "alloc",
+        "zeroize_derive",
+    ],
     proc_macros: ["libzeroize_derive"],
     apex_available: [
         "//apex_available:platform",
@@ -69,6 +72,7 @@
     prefer_rlib: true,
     no_stdlibs: true,
     stdlibs: [
+        "liballoc.rust_sysroot",
         "libcompiler_builtins.rust_sysroot",
         "libcore.rust_sysroot",
     ],
diff --git a/cargo2android.json b/cargo2android.json
index b6a9107..9ae6cab 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -3,17 +3,17 @@
   "run": true,
   "min_sdk_version": "Tiramisu",
   "vendor-available": true,
+  "features": "alloc,zeroize_derive",
   "variants": [
     {
-      "features": "alloc,zeroize_derive",
       "tests": true
     },
     {
-      "features": "zeroize_derive",
       "force-rlib": true,
       "no-host": true,
       "suffix": "_nostd",
-      "no-std": true
+      "no-std": true,
+      "alloc": true
     }
   ]
 }