| # 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/rust:rustc_library.bzl", "rustc_library") | |
| load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test") | |
| load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "component-events", | |
| srcs = [ | |
| "src/descriptor.rs", | |
| "src/events.rs", | |
| "src/lib.rs", | |
| "src/matcher.rs", | |
| "src/sequence.rs", | |
| ], | |
| edition = "2024", | |
| proc_macro_deps = [ | |
| "//third_party/rust_crates/vendor:paste", | |
| ], | |
| visibility = [ | |
| "//examples/components:__subpackages__", | |
| "//examples/fidl:__subpackages__", | |
| "//src/bringup:__subpackages__", | |
| "//src/connectivity:__subpackages__", | |
| "//src/devices:__subpackages__", | |
| "//src/diagnostics:__subpackages__", | |
| "//src/lib/diagnostics/inspect/runtime/rust:__pkg__", | |
| "//src/lib/fuchsia-component-test:__subpackages__", | |
| "//src/starnix:__subpackages__", | |
| "//src/sys:__subpackages__", | |
| "//src/testing/sl4f:__pkg__", | |
| "//src/testing/system-validation:__pkg__", | |
| "//tools/fidl:__subpackages__", | |
| "//vendor/google:__subpackages__", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/lib/moniker", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:pin-project-lite", | |
| "//third_party/rust_crates/vendor:regex-lite", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) | |
| # @bazel2gn:skip | |
| rustc_test( | |
| name = "component-events_test", | |
| crate = ":component-events", | |
| edition = "2024", | |
| deps = [ | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| ], | |
| ) | |
| # @bazel2gn:skip | |
| fx_unittest_package( | |
| name = "component-events-unittests", | |
| unit_tests = [":component-events_test"], | |
| ) |