blob: 055bb767556484ec7ce58c4d26f6cd01a0297828 [file] [log] [blame]
# Copyright 2025 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")
import("//src/developer/ffx/build/ffx_tool.gni")
import("//src/developer/ffx/lib/version/build/ffx_apply_version.gni")
rustc_library("lib") {
# This is named as such to avoid a conflict with an existing ffx echo command.
name = "ffx_usb_host_driver"
edition = "2021"
with_unit_tests = true
deps = [
"impl:lib",
"//src/developer/ffx/command:lib",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/logging:lib",
"//src/developer/ffx/lib/usb_driver_api:lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:serde_json",
]
test_deps = []
sources = [ "src/lib.rs" ]
}
ffx_tool("ffx_usb_driver") {
edition = "2021"
output_name = "ffx-usb-driver"
deps = [
":lib",
"//src/developer/ffx/lib/version:lib",
"//src/lib/fuchsia-async",
]
sources = [ "src/main.rs" ]
}
group("usb_driver") {
public_deps = [
":ffx_usb_driver",
":ffx_usb_driver_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_usb_driver_versioned" ]
}
group("tests") {
testonly = true
deps = [
":lib_test($host_toolchain)",
"impl:tests",
]
}