| // Copyright 2021, The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "system_security_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["system_security_license"], |
| } |
| |
| rust_library { |
| name: "libdiced_utils", |
| crate_name: "diced_utils", |
| srcs: ["src/utils.rs"], |
| vendor_available: true, |
| |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libanyhow", |
| "libdiced_open_dice_cbor", |
| "libkeystore2_crypto_rust", |
| ], |
| } |
| |
| rust_test { |
| name: "diced_utils_test", |
| crate_name: "diced_utils_test", |
| srcs: ["src/utils.rs"], |
| test_suites: ["general-tests"], |
| auto_gen_config: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libanyhow", |
| "libdiced_open_dice_cbor", |
| "libkeystore2_crypto_rust", |
| ], |
| } |
| |
| rust_library { |
| name: "libdiced_sample_inputs", |
| crate_name: "diced_sample_inputs", |
| srcs: ["src/sample_inputs.rs"], |
| vendor_available: true, |
| |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libanyhow", |
| "libdiced_open_dice_cbor", |
| "libdiced_utils", |
| "libkeystore2_crypto_rust", |
| ], |
| } |
| |
| rust_test { |
| name: "diced_sample_inputs_test", |
| crate_name: "diced_sample_inputs_test", |
| srcs: ["src/sample_inputs.rs"], |
| test_suites: ["general-tests"], |
| auto_gen_config: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libanyhow", |
| "libdiced_open_dice_cbor", |
| "libdiced_utils", |
| "libkeystore2_crypto_rust", |
| ], |
| } |
| |
| rust_library { |
| name: "libdiced", |
| crate_name: "diced", |
| srcs: ["src/lib.rs"], |
| |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "android.security.dice-rust", |
| "libdiced_open_dice_cbor", |
| "libanyhow", |
| "libbinder_rs", |
| "libdiced_utils", |
| "libkeystore2_crypto_rust", |
| "libkeystore2_selinux", |
| "liblibc", |
| "liblog_rust", |
| "libthiserror", |
| ], |
| } |
| |
| rust_library { |
| name: "libdiced_vendor", |
| crate_name: "diced", |
| srcs: ["src/lib_vendor.rs"], |
| |
| vendor_available: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libdiced_open_dice_cbor", |
| "libanyhow", |
| "libbinder_rs", |
| "libdiced_utils", |
| "libkeystore2_crypto_rust", |
| "liblibc", |
| "liblog_rust", |
| "libnix", |
| "libserde", |
| "libserde_cbor", |
| "libthiserror", |
| ], |
| } |
| |
| rust_binary { |
| name: "diced", |
| srcs: ["src/diced_main.rs"], |
| prefer_rlib: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libandroid_logger", |
| "libbinder_rs", |
| "libdiced", |
| "libdiced_open_dice_cbor", |
| "libdiced_sample_inputs", |
| "libdiced_utils", |
| "liblog_rust", |
| ], |
| init_rc: ["diced.rc"], |
| } |
| |
| rust_binary { |
| name: "diced.microdroid", |
| srcs: ["src/diced_main.rs"], |
| prefer_rlib: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libandroid_logger", |
| "libbinder_rs", |
| "libdiced", |
| "libdiced_open_dice_cbor", |
| "libdiced_sample_inputs", |
| "libdiced_utils", |
| "liblog_rust", |
| ], |
| init_rc: ["diced.microdroid.rc"], |
| bootstrap: true, |
| } |
| |
| rust_test { |
| name: "diced_test", |
| crate_name: "diced_test", |
| srcs: ["src/lib.rs"], |
| test_suites: ["general-tests"], |
| auto_gen_config: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "android.security.dice-rust", |
| "libanyhow", |
| "libbinder_rs", |
| "libdiced_open_dice_cbor", |
| "libdiced_utils", |
| "libkeystore2_crypto_rust", |
| "libkeystore2_selinux", |
| "libkeystore2_vintf_rust", |
| "liblibc", |
| "liblog_rust", |
| "libnix", |
| "libserde", |
| "libserde_cbor", |
| "libthiserror", |
| ], |
| } |
| |
| rust_test { |
| name: "diced_vendor_test", |
| crate_name: "diced_vendor_test", |
| srcs: ["src/lib_vendor.rs"], |
| test_suites: ["general-tests"], |
| auto_gen_config: true, |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "libanyhow", |
| "libdiced_open_dice_cbor", |
| "libdiced_sample_inputs", |
| "libdiced_utils", |
| "libbinder_rs", |
| "libkeystore2_crypto_rust", |
| "liblibc", |
| "liblog_rust", |
| "libnix", |
| "libserde", |
| "libserde_cbor", |
| "libthiserror", |
| ], |
| } |
| |
| rust_test { |
| name: "diced_client_test", |
| srcs: [ |
| "src/diced_client_test.rs", |
| ], |
| require_root: true, |
| auto_gen_config: true, |
| test_suites: [ |
| "general-tests", |
| ], |
| |
| rustlibs: [ |
| "android.hardware.security.dice-V1-rust", |
| "android.security.dice-rust", |
| "libanyhow", |
| "libbinder_rs", |
| "libdiced_open_dice_cbor", |
| "libdiced_sample_inputs", |
| "libdiced_utils", |
| "libnix", |
| ], |
| } |