| # Copyright 2018 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_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| group("stash") { |
| testonly = true |
| deps = [ |
| ":pkg", |
| ":tests", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":stash-tests", |
| "tests", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "stash" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//sdk/fidl/fuchsia.stash:fuchsia.stash-rustc", |
| "//sdk/fidl/fuchsia.stash:rust_measure_tape_for_key_value", |
| "//sdk/fidl/fuchsia.stash:rust_measure_tape_for_list_item", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-sys", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:bytes", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/accessor.rs", |
| "src/instance.rs", |
| "src/main.rs", |
| "src/store.rs", |
| ] |
| } |
| |
| fuchsia_component("stash_secure") { |
| deps = [ ":bin" ] |
| manifest = "meta/stash_secure.cmx" |
| } |
| |
| fuchsia_component("stash_cmp") { |
| component_name = "stash" |
| deps = [ ":bin" ] |
| manifest = "meta/stash.cmx" |
| } |
| |
| fuchsia_component("stash2_cmp") { |
| component_name = "stash2" |
| deps = [ ":bin" ] |
| manifest = "meta/stash2.cmx" |
| } |
| |
| fuchsia_package("pkg") { |
| package_name = "stash" |
| deps = [ |
| ":stash2_cmp", |
| ":stash_cmp", |
| ":stash_secure", |
| ] |
| } |
| |
| fuchsia_unittest_package("stash-tests") { |
| manifest = "meta/stash_bin_test.cmx" |
| deps = [ ":bin_test" ] |
| test_specs = { |
| } |
| } |