blob: 9e9862e30c0684c9fc5e680580e364a28048dfa4 [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/rust/rustc_library.gni")
rustc_library("crypto") {
edition = "2021"
with_unit_tests = true
name = "fxfs-crypto"
deps = [
"//sdk/rust/zx-status",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust",
"//src/storage/fxfs/trace",
"//src/storage/fxfs/unicode",
"//src/storage/lib/fscrypt",
"//src/storage/type-fprint:fprint",
"//third_party/rust_crates:aes",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:arbitrary",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:cbc",
"//third_party/rust_crates:chacha20",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rustc-hash",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:siphasher",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:zerocopy",
]
sources = [
"src/cipher.rs",
"src/cipher/fscrypt_ino_lblk32.rs",
"src/cipher/fxfs.rs",
"src/ff1.rs",
"src/lib.rs",
]
test_deps = [
"//third_party/rust_crates:hex",
"//third_party/rust_crates:rand",
]
visibility = [
"//src/storage/f2fs_reader/tests/*",
"//src/storage/fxfs/*",
]
# Default optimizations are for size, but that has a noticeable impact on speed.
if (!is_debug) {
configs -= [ "//build/config:default_optimize" ]
configs += [ "//build/config:optimize_speed" ]
}
}