Separate host and device tests

* To enable multilib for rust_test on device,
  but not for rust_test_host yet.
  Host tests depend on proc-macro2 library,
  which does not build for multilib on host yet.
* On device tests must link in static libraries
  since their .so versions are not installed
  in system/lib* yet.
* But device tests cannot link with both libstd.static
  and libslab, which depends on dynamic version of libstd.

Bug: 158677299
Test: mm in external/rust/crates
Test: atest -c --include-subdirs external/rust/crates
Change-Id: I6b7420b8e8e8335a203b8ca6536a7586491b2884
2 files changed
tree: 927c3fff45b9c3166252ef7251178aa2a9d7a07d
  1. src/
  2. tests/
  3. .cargo_vcs_info.json
  4. .gitignore
  5. Android.bp
  6. Cargo.toml
  7. Cargo.toml.orig
  8. CHANGELOG.md
  9. LICENSE
  10. METADATA
  11. MODULE_LICENSE_MIT
  12. OWNERS
  13. README.md
  14. TEST_MAPPING
README.md

Slab

Pre-allocated storage for a uniform data type.

Crates.io Build Status

Documentation

Usage

To use slab, first add this to your Cargo.toml:

[dependencies]
slab = "0.4.2"

Next, add this to your crate:

extern crate slab;

use slab::Slab;

let mut slab = Slab::new();

let hello = slab.insert("hello");
let world = slab.insert("world");

assert_eq!(slab[hello], "hello");
assert_eq!(slab[world], "world");

slab[world] = "earth";
assert_eq!(slab[world], "earth");

See documentation for more details.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in slab by you, shall be licensed as MIT, without any additional terms or conditions.