| # Copyright 2022 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("//src/developer/ffx/build/ffx_tool.gni") | |
| assert(is_host, "ffx_process is intended for the host toolchain only.") | |
| rustc_library("ffx_process_args") { | |
| version = "0.1.0" | |
| edition = "2024" | |
| sources = [ "src/args.rs" ] | |
| source_root = "src/args.rs" | |
| deps = [ "//third_party/rust_crates:argh" ] | |
| } | |
| rustc_library("ffx_process") { | |
| version = "0.3.0" | |
| edition = "2024" | |
| deps = [ | |
| ":ffx_process_args", | |
| "//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_rust_fdomain", | |
| "//sdk/fidl/fuchsia.process.explorer:fuchsia.process.explorer_rust_fdomain", | |
| "//sdk/rust/zx-status", | |
| "//sdk/rust/zx-types", | |
| "//src/developer/ffx/config:lib", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/developer/ffx/lib/symbol-index", | |
| "//src/developer/ffx/lib/target/holders:lib", | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//src/lib/fdomain/client", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| ] | |
| with_unit_tests = true | |
| sources = [ | |
| "src/fuchsia_map.rs", | |
| "src/lib.rs", | |
| "src/processes_data.rs", | |
| "src/write_human_readable_output.rs", | |
| ] | |
| test_deps = [ | |
| "//src/lib/fdomain/local", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates:pretty_assertions", | |
| ] | |
| } | |
| ffx_tool("ffx_process_tool") { | |
| edition = "2024" | |
| output_name = "ffx-process" | |
| deps = [ | |
| ":ffx_process", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/lib/fuchsia-async", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| sdk_target_name = "sdk" | |
| sdk_category = "partner" | |
| } | |
| group("process") { | |
| public_deps = [ | |
| ":ffx_process_tool", | |
| ":ffx_process_tool_host_tool", | |
| ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_process_tool_versioned" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":ffx_process_test" ] | |
| } |