blob: 6b47d6a5aea6598ad44f6ec82bb79695be45a3ad [file] [log] [blame]
# Copyright 2020 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")
if (is_host) {
rustc_library("lib") {
name = "fastboot"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-fs",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
]
non_rust_deps = [ "//third_party/boringssl" ]
sources = [
"src/command.rs",
"src/lib.rs",
"src/reply.rs",
"src/test_transport.rs",
]
}
}
group("fastboot") {
deps = [
":lib($host_toolchain)",
# This target copies the prebuilt fastboot into the build directory - as if
# it were a normally built tool - and defines metadata depended upon by the
# flashing workflow. When this fastboot implementation is ready, flashing
# logic should be replaced by the new tool - and this depedency may safely
# be removed.
"//build/images/tools:fastboot($host_toolchain)",
]
}
group("tests") {
testonly = true
deps = [ ":lib_test($host_toolchain)" ]
}