blob: d7b2772815d0e2b5fb3c46c7b077ff6eb6410e56 [file]
# 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/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
load("//src/developer/ffx/build:ffx_tool.bzl", "ffx_tool")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "lib",
srcs = [
"src/fxfs.rs",
"src/lib.rs",
],
crate_name = "ffx_storage",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
"//sdk/rust/zx-status",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/target/holders:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust_fdomain",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:hex",
],
)
ffx_tool(
name = "ffx_storage",
srcs = ["src/main.rs"],
# LINT.IfChange
binary_name = "ffx-storage",
# LINT.ThenChange(BUILD.gn)
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":lib",
"//src/developer/ffx/lib/fho:lib",
"//src/lib/fuchsia-async",
],
)
host_rustc_test(
name = "lib_test",
crate = ":lib",
visibility = ["//src/developer/ffx:__pkg__"],
)