| # Copyright 2021 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("lib") { |
| name = "kcounter" |
| edition = "2018" |
| with_unit_tests = true |
| |
| visibility = [ |
| "//src/diagnostics/kcounter/*", |
| "//src/diagnostics/launcher/*", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel-rustc", |
| "//src/lib/diagnostics/inspect/runtime/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/lib/fuchsia-async", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("diagnostics-kcounter") { |
| manifest = "meta/diagnostics-kcounter.cml" |
| deps = [ "//src/diagnostics/launcher:bin" ] |
| } |
| |
| fuchsia_unittest_package("diagnostics-kcounter-tests") { |
| deps = [ ":lib_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":diagnostics-kcounter-tests" ] |
| } |
| |
| group("kcounter") { |
| testonly = true |
| deps = [ ":diagnostics-kcounter" ] |
| } |