blob: 33eba96282674b7828d3824006a6e9511b6fca50 [file] [log] [blame]
# Copyright 2023 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, "discovery is for use with the host toolchain only")
rustc_library("lib") {
name = "discovery"
version = "0.1.0"
edition = "2024"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust",
"//src/developer/ffx/fidl:fuchsia.developer.ffx_rust",
"//src/developer/ffx/lib/addr:lib",
"//src/developer/ffx/lib/emulator_instance:lib",
"//src/developer/ffx/lib/fastboot_file_discovery:lib",
"//src/developer/ffx/lib/manual_targets:lib",
"//src/developer/ffx/lib/mdns_discovery:lib",
"//src/developer/ffx/lib/netext:lib",
"//src/developer/ffx/lib/usb_driver_api:lib",
"//src/developer/ffx/lib/usb_fastboot_discovery:lib",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl/rust/fidl_message",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:bitflags",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tokio",
]
test_deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net_rust",
"//src/developer/ffx/config:lib",
"//src/lib/fuchsia",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:test-case",
]
sources = [
"src/cache.rs",
"src/desc.rs",
"src/emulator_watcher.rs",
"src/error.rs",
"src/events.rs",
"src/fastboot_file_watcher.rs",
"src/lib.rs",
"src/merge.rs",
"src/query.rs",
"src/usb_vsock_watcher.rs",
]
}
group("discovery") {
public_deps = [ ":lib" ]
}
group("tests") {
testonly = true
deps = [ ":lib_test" ]
}