| # Copyright 2024 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("hooks") { |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.diagnostics.types:fuchsia.diagnostics.types_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/component_manager/lib/errors", |
| "//src/sys/component_manager/lib/sandbox", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/cm_types", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_unittest_component("test_component") { |
| deps = [ ":hooks_test" ] |
| } |
| |
| fuchsia_test_package("tests") { |
| package_name = "hooks_test" |
| test_components = [ ":test_component" ] |
| } |