blob: bdbdae2791093703252e964cf2af9e08aca5c79c [file] [log] [blame]
# 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/components/fuchsia_unittest_component.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
rustc_library("lib") {
edition = "2021"
deps = [
"//src/lib/fidl/rust/fidl",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust",
"//third_party/rust_crates:aes-gcm-siv",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [
"src/lib.rs",
"src/log.rs",
]
name = "fxfs_crypt"
with_unit_tests = true
}
fuchsia_unittest_component("fxfs-crypt-test") {
deps = [ ":lib_test" ]
}
fuchsia_test_package("fxfs-crypt-tests") {
test_components = [ ":fxfs-crypt-test" ]
}
rustc_binary("fxfs_crypt") {
edition = "2021"
deps = [
":lib",
"//src/lib/diagnostics/log/rust",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "src/main.rs" ]
# Optimize for size
configs += [ "//build/config/rust:bootfs" ]
}
fuchsia_component("fxfs-crypt") {
manifest = "meta/fxfs_crypt.cml"
deps = [ ":fxfs_crypt" ]
}
fuchsia_package("package") {
package_name = "fxfs-crypt"
deps = [ ":fxfs-crypt" ]
}
group("tests") {
testonly = true
deps = [ ":fxfs-crypt-tests" ]
}