| # 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/rules/rust:rustc_library.bzl", "rustc_library") | |
| package(default_applicable_licenses = ["//:license"]) | |
| # The unit tests (`:package-directory_test`, `:test-component`, and | |
| # `:package-directory-tests`) stay in BUILD.gn because `:package-directory_test` | |
| # depends on `//src/sys/pkg/lib/fuchsia-pkg-testing`, which is GN-only and | |
| # depends on `//src/sys/pkg/lib/system-image` and | |
| # `//src/sys/pkg/lib/update-package` (both of which depend back on | |
| # `:package-directory`). | |
| rustc_library( | |
| name = "package-directory", | |
| srcs = [ | |
| "src/lib.rs", | |
| "src/meta_as_dir.rs", | |
| "src/meta_subdir.rs", | |
| "src/non_meta_subdir.rs", | |
| "src/root_dir.rs", | |
| "src/root_dir_cache.rs", | |
| ], | |
| edition = "2024", | |
| lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| visibility = [ | |
| "//src/storage/benchmarks/fuchsia/pkgdir-component:__pkg__", | |
| "//src/sys/component_manager:__pkg__", | |
| "//src/sys/pkg:__subpackages__", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/collections/packed", | |
| "//src/lib/diagnostics/inspect/rust:fuchsia-inspect", # @bazel2gn:path_overwrite://src/lib/diagnostics/inspect/rust | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-fs", | |
| "//src/storage/lib/vfs/rust:vfs", | |
| "//src/sys/pkg/lib/blobfs", | |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", | |
| "//src/sys/pkg/lib/fuchsia-hash", | |
| "//src/sys/pkg/lib/fuchsia-pkg", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:log", | |
| "//third_party/rust_crates/vendor:static_assertions", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) |