| # Copyright 2023 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| load("//bazel/portage/build_defs:common.bzl", "RUSTC_DEBUG_FLAGS") |
| load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") |
| |
| filegroup( |
| name = "srcs", |
| srcs = glob( |
| ["**"], |
| exclude = ["BUILD.bazel"], |
| ), |
| visibility = ["//bazel/portage/bin/alchemist:__pkg__"], |
| ) |
| |
| rust_library( |
| name = "cliutil", |
| srcs = glob(["src/*.rs"]), |
| crate_name = "cliutil", |
| rustc_flags = RUSTC_DEBUG_FLAGS, |
| visibility = ["//visibility:public"], |
| deps = [ |
| "//bazel/portage/common/fileutil", |
| "//bazel/portage/common/tracing-chrome-trace", |
| "@alchemy_crates//:anyhow", |
| "@alchemy_crates//:itertools", |
| "@alchemy_crates//:nix", |
| "@alchemy_crates//:shell-escape", |
| "@alchemy_crates//:tracing", |
| "@alchemy_crates//:tracing-subscriber", |
| ], |
| ) |
| |
| rust_test( |
| name = "cliutil_test", |
| size = "small", |
| crate = ":cliutil", |
| rustc_flags = RUSTC_DEBUG_FLAGS, |
| deps = [ |
| "@alchemy_crates//:tempfile", |
| ], |
| ) |