| # Copyright 2026 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. | |
| load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test") | |
| load("//src/developer/ffx/build:ffx_plugin.bzl", "ffx_plugin") | |
| package(default_applicable_licenses = ["//:license"]) | |
| ffx_plugin( | |
| name = "ffx_profile_memory", | |
| srcs = [ | |
| "src/bucket.rs", | |
| "src/digest.rs", | |
| "src/lib.rs", | |
| "src/plugin_output.rs", | |
| "src/write_csv_output.rs", | |
| "src/write_human_readable_output.rs", | |
| ], | |
| args_deps = [ | |
| "//src/developer/ffx/core:lib", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:argh", | |
| ], | |
| args_srcs = ["src/args.rs"], | |
| edition = "2024", | |
| plugin_deps = [ | |
| "//src/developer/ffx/plugins/profile/memory/components:ffx_profile_memory_components", | |
| "//src/developer/ffx/plugins/profile/memory/signal:ffx_profile_memory_signal", | |
| ], | |
| sdk_category = "not-yet-specified", | |
| version = "0.1.0", | |
| visibility = ["//src/developer/ffx/plugins/profile:__pkg__"], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_rust_fdomain", | |
| "//sdk/fidl/fuchsia.memory.attribution.plugin:fuchsia.memory.attribution.plugin_rust_fdomain", | |
| "//sdk/fidl/fuchsia.memory.inspection:fuchsia.memory.inspection_rust_fdomain", | |
| "//src/developer/ffx/lib/errors:lib", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/developer/ffx/lib/target/holders:lib", | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//src/developer/ffx/plugins/profile/memory/components:ffx_profile_memory_components", | |
| "//src/developer/ffx/plugins/profile/memory/components:ffx_profile_memory_components_args", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fuchsia-async", | |
| "//src/performance/memory/attribution/processing", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:humansize", | |
| "//third_party/rust_crates/vendor:regex", | |
| "//third_party/rust_crates/vendor:serde", | |
| "//third_party/rust_crates/vendor:serde_json", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "ffx_profile_memory_test", | |
| crate = ":ffx_profile_memory", | |
| visibility = ["//src/developer/ffx:__pkg__"], | |
| deps = [ | |
| "//src/lib/fdomain/local", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| ], | |
| ) |