dice: add trusty build rules

Adds the ability to build libdiced_open_dice with the trusty build
system. Besides the various rules.mk files this requires a few changes
to the library itself:

Bindgen changes:

1. The bindgen headers have each been moved to to their own subdir. This
   stems from a limitation in the trusty build system whereby you can't
   have two rules.mk files in the same directory.

2. A lib.rs has been added for each bindgen target. This remains unused
   in the android build, but is needed in the trusty build so we can
   include!() the generated bindings.

Test changes:

1. The tests have been wrapped in a module so that they can be
   conditionally compiled. The trusty build system doesn't support
   building rust test targets on their own. It will attempt to compile
   this code as a non-test target.

2. A feature, `trusty`, has been added to the test crate to guard
   invoking the trusty test harness initialization macro.

Bug: 369146791
Test: atest libdiced_open_dice_nostd.integration_test
Test: # requires associated trusty changes (see topic) \
	trusty/vendor/google/aosp/scripts/build.py qemu-generic-arm64-test-debug \
	--test="boot-test:com.android.trusty.rust.diced_open_dice_tests.test" \
Change-Id: Ibaefa21473c1de5882a8a225a06d17f1466b4a7f
12 files changed
tree: 95d8ec3abf3ee39b7aa76156655b15c1447dcc41
  1. android/
  2. build/
  3. docs/
  4. guest/
  5. libs/
  6. microfuchsia/
  7. tests/
  8. .clang-format
  9. .gitignore
  10. Android.bp
  11. dice_for_avf_guest.cddl
  12. OWNERS
  13. PREUPLOAD.cfg
  14. README.md
  15. rustfmt.toml
  16. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: