| # 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", "wrap_host_rust_test") | |
| 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 = "availability", | |
| srcs = ["src/lib.rs"], | |
| edition = "2024", | |
| visibility = ["//src/sys/lib/routing:__pkg__"], | |
| deps = [ | |
| "//sdk/rust/zx-status", | |
| "//src/sys/component_manager/lib/router_error", | |
| "//src/sys/lib/cm_types", | |
| "//src/sys/lib/moniker", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "availability_test", | |
| crate = ":availability", | |
| edition = "2024", | |
| deps = ["//third_party/rust_crates/vendor:test-case"], | |
| ) | |
| wrap_host_rust_test( | |
| name = "availability_host_test", | |
| binary_name = "availability_test", | |
| ) | |
| fx_unittest_package( | |
| name = "fuchsia-routing-availability-tests", | |
| unit_tests = [":availability_test"], | |
| ) |