blob: e1cab64406c96d9d35a882bd269868172f037075 [file] [log] [blame] [edit]
# Copyright 2022 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 = "fileutil",
srcs = glob(["src/*.rs"]),
crate_name = "fileutil",
rustc_flags = RUSTC_DEBUG_FLAGS,
visibility = ["//bazel:internal"],
deps = [
"@alchemy_crates//:anyhow",
"@alchemy_crates//:lazy_static",
"@alchemy_crates//:libc",
"@alchemy_crates//:tempfile",
"@alchemy_crates//:walkdir",
],
)
rust_test(
name = "fileutil_test",
size = "small",
crate = ":fileutil",
rustc_flags = RUSTC_DEBUG_FLAGS,
)