blob: a97fa8ec4e08f17e5ab403cb6fa19d8604f6f818 [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("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS")
load("//build/bazel/rules/rust:defs.bzl", "rustc_library")
package(default_visibility = ["//visibility:public"])
rustc_library(
name = "lib",
srcs = [
"src/aliases.rs",
"src/api/mod.rs",
"src/api/query.rs",
"src/api/value.rs",
"src/environment.rs",
"src/environment/context.rs",
"src/environment/kind.rs",
"src/environment/test_env.rs",
"src/keys.rs",
"src/lib.rs",
"src/logging.rs",
"src/mapping/build.rs",
"src/mapping/cache.rs",
"src/mapping/config.rs",
"src/mapping/data.rs",
"src/mapping/env_var.rs",
"src/mapping/file_check.rs",
"src/mapping/filter.rs",
"src/mapping/flatten.rs",
"src/mapping/home.rs",
"src/mapping/mod.rs",
"src/mapping/runtime.rs",
"src/mapping/shared_data.rs",
"src/mapping/workspace.rs",
"src/nested.rs",
"src/paths.rs",
"src/runtime.rs",
"src/storage.rs",
],
compile_data = [
"test_data/sdk/meta/manifest.json",
"test_data/sdk/tools/x64/a_host_tool-meta.json",
"test_data/sdk/tools/x64/a-host-tool",
],
crate_name = "ffx_config",
edition = "2024",
rustc_env = {
# TODO(https://fxbug.dev/512640761): Migrate test_data and set this env properly when we can
# execute Bazel test in infra.
"DOMAINS_TEST_DATA_PATH": "TODO", # @bazel2gn:value_overwrite:${_domains_test_data_path}
},
tags = [
"assert_no_deps=//src/developer/ffx/daemon/*",
"assert_no_deps=//src/developer/ffx/lib/target/*",
],
target_compatible_with = HOST_CONSTRAINTS,
test_deps = [
"//src/developer/ffx/config/domain:test_data",
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:assert_matches",
"//third_party/rust_crates/vendor:futures",
],
version = "0.1.0",
with_host_unit_tests = True,
deps = [
"//src/developer/ffx/command/error:lib",
"//src/developer/ffx/config/domain:lib",
"//src/developer/ffx/config/macro:config-macros",
"//src/developer/ffx/lib/buildid:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/logging:lib",
"//src/developer/ffx/lib/sdk:lib",
"//src/developer/ffx/lib/version:lib",
"//src/lib/analytics/rust:lib",
"//src/lib/fuchsia-lockfile:lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:camino",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:home",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:rand",
"//third_party/rust_crates/vendor:regex",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:tempfile",
"//third_party/rust_crates/vendor:thiserror",
],
)