| # 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_binary.bzl", "rustc_binary") | |
| 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_binary( | |
| name = "multi-universal-tool", | |
| srcs = ["src/main.rs"], | |
| crate_name = "multi_universal_tool", | |
| edition = "2024", | |
| lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| visibility = [ | |
| "//src/sys/pkg/bin/pkgctl:__pkg__", | |
| "//src/sys/pkg/bin/update:__pkg__", | |
| ], | |
| deps = [ | |
| "//src/sys/pkg/bin/pkgctl:lib", | |
| "//src/sys/pkg/bin/update:lib", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) | |
| # @bazel2gn:skip | |
| rustc_test( | |
| name = "multi-universal-tool_test", | |
| crate = ":multi-universal-tool", | |
| edition = "2024", | |
| lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| ) | |
| # @bazel2gn:skip | |
| fx_unittest_package( | |
| name = "multi-universal-tool-tests", | |
| unit_tests = [":multi-universal-tool_test"], | |
| ) |