| # 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:defs.bzl", "rustc_library", "rustc_test") | |
| load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "replace-with", | |
| srcs = ["src/lib.rs"], | |
| edition = "2024", | |
| visibility = [ | |
| "//src/connectivity/network/netstack3:__subpackages__", | |
| "//src/developer/adb/bin/adb-sideload:__pkg__", | |
| "//src/lib/fdomain/container:__pkg__", | |
| "//src/lib/network/packet:__pkg__", | |
| "//src/starnix/kernel/core:__pkg__", | |
| "//vendor/google:__subpackages__", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "replace-with_lib_test", | |
| crate = ":replace-with", | |
| edition = "2024", | |
| ) | |
| wrap_host_rust_test( | |
| name = "replace-with-host_test", | |
| binary_name = "replace-with_lib_test", | |
| ) | |
| fx_unittest_package( | |
| name = "replace-with-test", | |
| unit_tests = [":replace-with_lib_test"], | |
| ) |