| # 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") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "base_package", | |
| srcs = [ | |
| "src/base_package.rs", | |
| "src/lib.rs", | |
| ], | |
| crate_name = "assembly_base_package", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| version = "0.1.0", | |
| visibility = ["//src/lib/assembly:__subpackages__"], | |
| deps = [ | |
| "//src/lib/assembly/constants", | |
| "//src/lib/assembly/package_list", | |
| "//src/sys/pkg/lib/fuchsia-pkg", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:camino", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "base_package_test", | |
| crate = ":base_package", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//src/lib/assembly:__pkg__"], | |
| deps = [ | |
| "//src/lib/assembly/test_util", | |
| "//src/lib/fuchsia-url", | |
| "//src/sys/pkg/lib/far/rust:fuchsia-archive", | |
| "//src/sys/pkg/lib/fuchsia-hash", | |
| "//third_party/rust_crates/vendor:tempfile", | |
| ], | |
| ) |