| # 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 = "2018" |
| deps = [ |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/fxfs:fuchsia.fxfs-rustc", |
| "//third_party/rust_crates:aes-gcm-siv", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| sources = [ "src/lib.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 = "2018" |
| deps = [ |
| ":lib", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("fxfs-crypt") { |
| manifest = "meta/fxfs_crypt.cml" |
| deps = [ ":fxfs_crypt" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fxfs-crypt-tests" ] |
| } |