| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/host.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| if (is_host) { |
| rustc_library("scrutiny_x") { |
| name = "scrutiny_x" |
| with_unit_tests = true |
| edition = "2021" |
| |
| sources = [ |
| "src/api.rs", |
| "src/blob.rs", |
| "src/data_source.rs", |
| "src/hash.rs", |
| "src/lib.rs", |
| "src/package.rs", |
| "src/product_bundle.rs", |
| "src/scrutiny.rs", |
| "src/system.rs", |
| "src/update_package.rs", |
| "src/zbi.rs", |
| ] |
| |
| deps = [ |
| "//build/sdk/meta:rust", |
| "//src/lib/fuchsia-url", |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//src/sys/pkg/lib/update-package", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:camino", |
| "//third_party/rust_crates:derivative", |
| "//third_party/rust_crates:dyn-clone", |
| "//third_party/rust_crates:once_cell", |
| "//third_party/rust_crates:rayon", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| |
| # TODO(fxbug.dev/112505): This dependency was introduced for accessing blobfs archives via |
| # bespoke code that is not owned by the storage team. `scrutiny_x` should contain its own |
| # implementation of blobfs access via a storage team-owned API. |
| "//src/security/lib/scrutiny/utils", |
| ] |
| test_deps = [ |
| "//src/lib/assembly/assembly_manifest", |
| "//src/lib/assembly/partitions_config", |
| "//src/lib/assembly/update_package", |
| "//src/lib/fuchsia", |
| "//src/sys/pkg/lib/epoch", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":scrutiny_x_test($host_toolchain)" ] |
| } |