blob: 1d231e854f8446fbfeedde37908ae5369324702c [file] [log] [blame]
# 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_binary.gni")
import("//build/rust/rustc_library.gni")
rustc_library("lib") {
name = "inspect_runtime"
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//sdk/lib/inspect:client_includes",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/vfs/rust:vfs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/lib/fdio/rust:fdio",
"//src/lib/fuchsia-component-test",
# TODO(https://fxbug.dev/81400): Remove this dep during post-migration cleanup.
"//src/sys/lib/component-events",
]
sources = [
"src/lib.rs",
"src/service.rs",
]
}
fuchsia_unittest_package("inspect-runtime-tests") {
manifest = "meta/inspect_runtime_lib_test.cml"
deps = [
":inspect_test_component",
":lib_test",
]
}
rustc_binary("inspect_test_component_bin") {
testonly = true
edition = "2021"
source_root = "test/main.rs"
deps = [
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "test/main.rs" ]
}
fuchsia_component("inspect_test_component") {
testonly = true
deps = [ ":inspect_test_component_bin" ]
manifest = "meta/inspect_test_component.cml"
}
fuchsia_component("inspect_test_component_v1") {
component_name = "inspect_test_component"
testonly = true
deps = [ ":inspect_test_component_bin" ]
manifest = "meta/inspect_test_component.cmx"
}
group("tests") {
testonly = true
deps = [ ":inspect-runtime-tests" ]
}
group("rust") {
public_deps = [ ":lib" ]
}