blob: 280eb83bd182ac36beafc710bf5091918ac94566 [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/rules/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
# The unit tests (`:system-image_test`, `:system-image-test-component`, and
# `:system-image-tests`) stay in BUILD.gn because `system-image-test-component`
# packages `//src/storage/testing:storage_driver_test_realm`, and
# `:system-image_test` depends on `//src/sys/pkg/lib/fuchsia-pkg-testing` and
# `//src/sys/pkg/testing/blobfs-ramdisk` (which are GN-only and depend back on
# `:system-image`).
rustc_library(
name = "system-image",
srcs = [
"src/anchored_packages.rs",
"src/cache_packages.rs",
"src/errors.rs",
"src/lib.rs",
"src/path_hash_mapping.rs",
"src/system_image.rs",
],
edition = "2024",
lint_config = "//build/config/rust/lints:clippy_warn_all",
visibility = [
"//src/sys/component_manager:__pkg__",
"//src/sys/pkg:__subpackages__",
],
deps = [
"//src/lib/buf-read-ext",
"//src/lib/collections/sorted-vec-map",
"//src/lib/diagnostics/inspect/rust:fuchsia-inspect", # @bazel2gn:path_overwrite://src/lib/diagnostics/inspect/rust
"//src/lib/fuchsia-url",
"//src/sys/pkg/lib/blobfs",
"//src/sys/pkg/lib/fuchsia-hash",
"//src/sys/pkg/lib/fuchsia-pkg",
"//src/sys/pkg/lib/package-directory",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:thiserror",
],
)