blob: 71a775504675e299895290344d42bfb82237ba3f [file] [log] [blame] [edit]
# 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/rust/rustc_library.gni")
assert(is_host, "The USB driver API should only be built for the host OS")
rustc_library("lib") {
name = "usb_driver_api"
edition = "2024"
deps = [
"//src/developer/ffx/fidl/usb:fuchsia.ffx.usb_rust_common",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl/rust/fidl_message",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tokio",
]
if (!is_mac) {
with_unit_tests = true
test_deps = [
"//src/developer/ffx/lib/usb_vsock_host",
"//src/developer/ffx/tools/usb_driver/impl:lib",
"//src/developer/lib/usb_vsock",
"//src/lib/fuchsia",
"//third_party/rust_crates:tempfile",
]
}
sources = [ "src/lib.rs" ]
}
group("usb_driver_api") {
public_deps = [ ":lib" ]
}
group("tests") {
testonly = true
deps = [ ":lib_test" ]
}