blob: 7bfdf7b09e4d275c4472261ea0c6094ab14ed881 [file] [log] [blame]
# Copyright 2021 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/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//build/testing/test_spec.gni")
assert(is_host, "ffx_fastboot is for use with the host toolchain only")
rustc_library("lib") {
name = "ffx_fastboot"
edition = "2021"
with_unit_tests = true
visibility = [
":*",
"//src/developer/ffx/daemon/protocols/target_collection:*",
"//src/developer/ffx/daemon/target:*",
"//src/developer/ffx/lib/diagnostics/checks:*",
"//src/developer/ffx/plugins/target/bootloader:*",
"//src/developer/ffx/plugins/target/fastboot:*",
"//src/developer/ffx/plugins/target/flash:*",
# TODO(https://fxbug.dev/404090546): Refactor FlashManifestVersion to a smaller crate
"//src/developer/ffx/plugins/product/create:*",
]
deps = [
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/fastboot/flash_manifest:lib",
"//src/developer/ffx/lib/fastboot/interface:lib",
"//src/developer/ffx/lib/pbms:lib",
"//src/developer/ffx/lib/sdk:lib",
"//src/lib/assembly/product_bundle",
"//src/storage/lib/sparse/rust:lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-fs",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:base64",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:camino",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:flate2",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:ring",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:tar",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:tokio",
"//third_party/rust_crates:walkdir",
"//third_party/rust_crates:zip",
]
test_deps = [
"//src/lib/assembly/partitions_config",
"//src/lib/fuchsia",
"//third_party/rust_crates:serde_json",
]
sources = [
"src/boot/mod.rs",
"src/common/crypto.rs",
"src/common/mod.rs",
"src/common/vars.rs",
"src/file_resolver/mod.rs",
"src/file_resolver/resolvers.rs",
"src/info/mod.rs",
"src/lib.rs",
"src/lock/mod.rs",
"src/manifest/mod.rs",
"src/manifest/resolvers.rs",
"src/manifest/v1.rs",
"src/manifest/v2.rs",
"src/manifest/v3.rs",
"src/unlock/mod.rs",
"src/util.rs",
]
}
group("fastboot") {
public_deps = [ ":lib" ]
}
group("tests") {
testonly = true
deps = [
":lib_test",
"./connection_factory:tests",
"./flash_manifest:tests",
"./interface:tests",
"./transport/factory:tests",
"./transport/interface:tests",
]
}