|  | # 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_binary.gni") | 
|  | import("//build/rust/rustc_library.gni") | 
|  | import("//src/sys/build/components.gni") | 
|  |  | 
|  | group("rust") { | 
|  | deps = [ ":lib" ] | 
|  | } | 
|  |  | 
|  | group("tests") { | 
|  | testonly = true | 
|  | deps = [ ":diagnostics-reader-tests" ] | 
|  | } | 
|  |  | 
|  | rustc_library("lib") { | 
|  | name = "diagnostics_reader" | 
|  | with_unit_tests = true | 
|  |  | 
|  | deps = [ | 
|  | "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc", | 
|  | "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", | 
|  | "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", | 
|  | "//src/lib/diagnostics/data/rust", | 
|  | "//src/lib/diagnostics/inspect/node-hierarchy/rust", | 
|  | "//src/lib/diagnostics/inspect/rust", | 
|  | "//src/lib/fidl/rust/fidl", | 
|  | "//src/lib/fuchsia-async", | 
|  | "//src/lib/fuchsia-component", | 
|  | "//src/lib/zircon/rust:fuchsia-zircon", | 
|  | "//third_party/rust_crates:anyhow", | 
|  | "//third_party/rust_crates:futures", | 
|  | "//third_party/rust_crates:pin-project", | 
|  | "//third_party/rust_crates:serde", | 
|  | "//third_party/rust_crates:serde_json", | 
|  | ] | 
|  |  | 
|  | sources = [ "src/lib.rs" ] | 
|  | } | 
|  |  | 
|  | fuchsia_unittest_package("diagnostics-reader-tests") { | 
|  | manifest = "meta/diagnostics-reader-unittest.cmx" | 
|  | deps = [ | 
|  | ":lib_test", | 
|  | "//src/lib/diagnostics/inspect/rust:inspect_test_component", | 
|  | ] | 
|  | } |