blob: cc09fe076f0f89316a432d5a21aae75fa2dd88bb [file] [edit]
# Copyright 2021 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.
import("//build/components.gni")
import("//build/rust/rustc_library.gni")
rustc_library("package-directory") {
version = "0.1.0"
edition = "2024"
with_unit_tests = true
visibility = [
":*",
"//src/storage/benchmarks/*",
"//src/sys/base-resolver:*",
"//src/sys/component_manager:*",
"//src/sys/pkg/*",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/rust/zx",
"//src/lib/collections/packed",
"//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:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-url",
"//src/sys/pkg/lib/far/rust:fuchsia-archive",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:pretty_assertions",
]
sources = [
"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",
]
configs += [ "//build/config/rust/lints:clippy_warn_all" ]
}
fuchsia_component("test-component") {
component_name = "package-directory-lib-test"
visibility = [ ":*" ]
testonly = true
deps = [ ":package-directory_test" ]
manifest = "meta/package-directory-lib-test.cml"
}
fuchsia_test_package("package-directory-tests") {
test_components = [ ":test-component" ]
}
group("tests") {
testonly = true
public_deps = [ ":package-directory-tests" ]
}