| # Copyright 2023 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") |
| |
| rustc_binary("bin") { |
| name = "system_activity_governor" |
| edition = "2021" |
| sources = [ |
| "src/main.rs", |
| "src/system_activity_governor.rs", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.suspend:fuchsia.hardware.suspend_rust", |
| "//sdk/fidl/fuchsia.power.broker:fuchsia.power.broker_rust", |
| "//sdk/fidl/fuchsia.power.suspend:fuchsia.power.suspend_rust", |
| "//sdk/fidl/fuchsia.power.system:fuchsia.power.system_rust", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/runtime/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/trace/rust:trace", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/power/broker/client", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| } |
| |
| fuchsia_component_manifest("manifest") { |
| manifest = "meta/system-activity-governor.cml" |
| component_name = "system-activity-governor" |
| } |
| |
| group("system-activity-governor") { |
| testonly = true |
| deps = [ |
| ":bin", |
| ":tests", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| cm_label = ":manifest" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("package") { |
| package_name = "system-activity-governor" |
| deps = [ ":component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| "fake/tests", |
| "integration/tests", |
| ] |
| } |