Migrate zerocopy to monorepo.
Also remove rules.mk in old location to make sure Trusty picks up the
version in the monorepo
Bug: http://b/339424309
Test: treehugger
Change-Id: I8dadd4020ea48e872769156b848d4bd1c3dc6555
diff --git a/Android.bp b/Android.bp
index 49bb9f3..96beb97 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,107 +1 @@
-// This file is generated by cargo_embargo.
-// Do not modify this file because the changes will be overridden on upgrade.
-
-package {
- default_applicable_licenses: ["external_rust_crates_zerocopy_license"],
- default_team: "trendy_team_android_rust",
-}
-
-license {
- name: "external_rust_crates_zerocopy_license",
- visibility: [":__subpackages__"],
- license_kinds: ["SPDX-license-identifier-Apache-2.0"],
- license_text: ["LICENSE"],
-}
-
-rust_library {
- name: "libzerocopy",
- host_supported: true,
- crate_name: "zerocopy",
- cargo_env_compat: true,
- cargo_pkg_version: "0.7.35",
- crate_root: "src/lib.rs",
- edition: "2018",
- features: [
- "byteorder",
- "derive",
- "simd",
- "zerocopy-derive",
- ],
- rustlibs: ["libbyteorder"],
- proc_macros: ["libzerocopy_derive"],
- apex_available: [
- "//apex_available:platform",
- "//apex_available:anyapex",
- ],
- product_available: true,
- vendor_available: true,
- min_sdk_version: "34",
-}
-
-rust_library_rlib {
- name: "libzerocopy_nostd",
- crate_name: "zerocopy",
- cargo_env_compat: true,
- cargo_pkg_version: "0.7.35",
- crate_root: "src/lib.rs",
- edition: "2018",
- features: [
- "alloc",
- "byteorder",
- "derive",
- "simd",
- "zerocopy-derive",
- ],
- rustlibs: ["libbyteorder_nostd"],
- proc_macros: ["libzerocopy_derive"],
- 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,
- min_sdk_version: "34",
-}
-
-rust_library_rlib {
- name: "libzerocopy_nostd_noalloc",
- crate_name: "zerocopy",
- cargo_env_compat: true,
- cargo_pkg_version: "0.7.35",
- crate_root: "src/lib.rs",
- edition: "2018",
- features: [
- "byteorder",
- "derive",
- "simd",
- "zerocopy-derive",
- ],
- rustlibs: ["libbyteorder_nostd"],
- proc_macros: ["libzerocopy_derive"],
- apex_available: [
- "//apex_available:platform",
- "//apex_available:anyapex",
- ],
- prefer_rlib: true,
- no_stdlibs: true,
- stdlibs: [
- "libcompiler_builtins.rust_sysroot",
- "libcore.rust_sysroot",
- ],
- product_available: true,
- vendor_available: true,
- min_sdk_version: "34",
-}
-
-dirgroup {
- name: "trusty_dirgroup_external_rust_crates_zerocopy",
- visibility: ["//trusty/vendor/google/aosp/scripts"],
- dirs: ["."],
-}
+// This crate has been migrated to external/rust/android-crates-io.
diff --git a/TEST_MAPPING b/TEST_MAPPING
deleted file mode 100644
index 71b8cda..0000000
--- a/TEST_MAPPING
+++ /dev/null
@@ -1,8 +0,0 @@
-// Generated by update_crate_tests.py for tests that depend on this crate.
-{
- "imports": [
- {
- "path": "external/rust/crates/virtio-drivers"
- }
- ]
-}
diff --git a/cargo_embargo.json b/cargo_embargo.json
deleted file mode 100644
index 315b9c6..0000000
--- a/cargo_embargo.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "run_cargo": false,
- "variants": [
- {
- "features": [
- "derive",
- "byteorder",
- "simd"
- ]
- },
- {
- "features": [
- "alloc",
- "derive",
- "byteorder",
- "simd"
- ],
- "module_name_overrides": {
- "libbyteorder": "libbyteorder_nostd",
- "libzerocopy": "libzerocopy_nostd"
- },
- "package": {
- "zerocopy": {
- "alloc": true,
- "force_rlib": true,
- "host_supported": false,
- "no_std": true
- }
- }
- },
- {
- "features": [
- "derive",
- "byteorder",
- "simd"
- ],
- "module_name_overrides": {
- "libbyteorder": "libbyteorder_nostd",
- "libzerocopy": "libzerocopy_nostd_noalloc"
- },
- "package": {
- "zerocopy": {
- "force_rlib": true,
- "host_supported": false,
- "no_std": true
- }
- }
- },
- {
- "features": [
- "alloc",
- "derive",
- "byteorder"
- ],
- "package": {
- "zerocopy": {
- "alloc": true,
- "no_std": true
- }
- },
- "generate_androidbp": false,
- "generate_rulesmk": true
- }
- ],
- "min_sdk_version": "34"
-}
diff --git a/rules.mk b/rules.mk
deleted file mode 100644
index 71e086b..0000000
--- a/rules.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# This file is generated by cargo_embargo.
-# Do not modify this file after the LOCAL_DIR line
-# because the changes will be overridden on upgrade.
-# Content before the first line starting with LOCAL_DIR is preserved.
-
-LOCAL_DIR := $(GET_LOCAL_DIR)
-MODULE := $(LOCAL_DIR)
-MODULE_CRATE_NAME := zerocopy
-MODULE_RUST_CRATE_TYPES := rlib
-MODULE_SRCS := $(LOCAL_DIR)/src/lib.rs
-MODULE_ADD_IMPLICIT_DEPS := false
-MODULE_RUST_EDITION := 2018
-MODULE_RUSTFLAGS += \
- --cfg 'feature="alloc"' \
- --cfg 'feature="byteorder"' \
- --cfg 'feature="derive"' \
- --cfg 'feature="zerocopy-derive"'
-
-MODULE_LIBRARY_DEPS := \
- $(call FIND_CRATE,byteorder) \
- $(call FIND_CRATE,zerocopy-derive) \
- trusty/user/base/lib/liballoc-rust \
- trusty/user/base/lib/libcompiler_builtins-rust \
- trusty/user/base/lib/libcore-rust
-
-include make/library.mk