blob: cd53f742964e70e08fd827770aab2efac82201d2 [file] [log] [blame]
# Copyright 2023 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/images/args.gni")
import("//build/rust/rustc_library.gni")
rustc_library("platform") {
edition = "2021"
with_unit_tests = true
name = "fxfs-platform"
deps = []
sources = [ "src/lib.rs" ]
test_deps = []
if (is_fuchsia) {
sources += [
"src/fuchsia.rs",
"src/fuchsia/component.rs",
"src/fuchsia/debug.rs",
"src/fuchsia/device.rs",
"src/fuchsia/directory.rs",
"src/fuchsia/dirent_cache.rs",
"src/fuchsia/epochs.rs",
"src/fuchsia/errors.rs",
"src/fuchsia/file.rs",
"src/fuchsia/fxblob.rs",
"src/fuchsia/fxblob/blob.rs",
"src/fuchsia/fxblob/directory.rs",
"src/fuchsia/fxblob/reader.rs",
"src/fuchsia/fxblob/testing.rs",
"src/fuchsia/fxblob/writer.rs",
"src/fuchsia/memory_pressure.rs",
"src/fuchsia/node.rs",
"src/fuchsia/paged_object_handle.rs",
"src/fuchsia/pager.rs",
"src/fuchsia/profile.rs",
"src/fuchsia/remote_crypt.rs",
"src/fuchsia/symlink.rs",
"src/fuchsia/testing.rs",
"src/fuchsia/volume.rs",
"src/fuchsia/volumes_directory.rs",
]
deps += [
"//sdk/fidl/fuchsia.fs:fuchsia.fs_rust",
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust",
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_rust",
"//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/storage/fidl/fuchsia.fs.startup:fuchsia.fs.startup_rust",
"//src/storage/fxfs:fxfs_macros",
"//src/storage/fxfs:lib",
"//src/storage/fxfs/crypto",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust",
"//src/storage/fxfs/trace",
"//src/storage/lib/block_client/rust:remote-block-device",
"//src/storage/lib/delivery_blob",
"//src/storage/lib/fs_inspect",
"//src/storage/lib/storage_device",
"//src/storage/lib/vfs/rust:vfs",
"//src/sys/pkg/lib/fuchsia-hash",
"//src/sys/pkg/lib/fuchsia-merkle",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:arrayref",
"//third_party/rust_crates:async-channel",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:bincode",
"//third_party/rust_crates:bitflags",
"//third_party/rust_crates:either",
"//third_party/rust_crates:event-listener",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:linked-hash-map",
"//third_party/rust_crates:once_cell",
"//third_party/rust_crates:rustc-hash",
"//third_party/rust_crates:scopeguard",
"//third_party/rust_crates:tracing",
"//third_party/rust_crates:zstd",
"//third_party/zstd",
]
test_deps += [
"//sdk/fidl/fuchsia.device:fuchsia.device_rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/lib/test_util",
"//src/storage/blobfs/bin:blobfs-component",
"//src/storage/fxfs:lib",
"//src/storage/fxfs-crypt:lib",
"//src/storage/fxfs/crypto/insecure",
"//src/storage/lib/blob_writer:blob-writer",
"//src/storage/lib/fs_management/rust:fs_management",
"//src/storage/lib/fsverity-merkle",
"//src/storage/lib/ramdevice_client/rust:ramdevice_client",
"//src/sys/pkg/lib/fuchsia-merkle",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:rand",
]
}
visibility = [ "//src/storage/fxfs/*" ]
}
rustc_library("fxfs-testing") {
testonly = true
edition = "2021"
sources = [
"src/fuchsia/testing.rs",
"src/testing.rs",
]
source_root = "src/testing.rs"
deps = [
":platform",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/storage/fxfs:lib",
"//src/storage/fxfs/crypto/insecure",
"//src/storage/lib/storage_device",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
]
visibility = [
"//sdk/lib/zxio/tests/*",
"//src/starnix/kernel/*",
"//src/storage/conformance/conformance_harness/fxfs/*",
"//src/storage/fxfs/*",
]
}