| # 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/rust:defs.bzl", "rustc_library") | |
| package( | |
| default_applicable_licenses = ["//:license"], | |
| 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/file_check.rs", | |
| "src/mapping/filter.rs", | |
| "src/mapping/flatten.rs", | |
| "src/mapping/mod.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/lib/target/*", | |
| ], | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| test_deps = [ | |
| "//src/developer/ffx/config/domain:test_data", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates/vendor:assert_matches", | |
| ], | |
| 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/errors:lib", | |
| "//src/developer/ffx/lib/futures:lib", | |
| "//src/developer/ffx/lib/logging:lib", | |
| "//src/developer/ffx/lib/sdk:lib", | |
| "//src/developer/ffx/lib/version:lib", | |
| "//src/lib/agents: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:home", | |
| "//third_party/rust_crates/vendor:libc", | |
| "//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", | |
| ], | |
| ) |