| # Copyright 2020 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/rust/rustc_binary.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":example", |
| ":unittests", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| output_name = "full_resolver" |
| |
| # Generates a GN target for unit-tests with the label `bin_test`, and |
| # a binary named `full_resolver_bin_test`. |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.component.resolution:fuchsia.component.resolution_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-url", |
| "//src/lib/versioning/version-history/rust:version-history", |
| "//src/sys/lib/fidl-fuchsia-component-abi-ext", |
| "//src/sys/lib/mem_util", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "full-resolver" |
| manifest = "meta/full-resolver.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("full-resolver-pkg") { |
| package_name = "full-resolver" |
| deps = [ ":component" ] |
| } |
| |
| # TODO(https://fxbug.dev/42073789) Remove transitional labels |
| group("full-resolver") { |
| } |
| |
| fuchsia_component("example") { |
| manifest = "meta/example.cml" |
| } |
| |
| fuchsia_unittest_package("unittests") { |
| package_name = "full-resolver-unittests" |
| manifest = "meta/full-resolver-unittests.cml" |
| deps = [ |
| ":bin_test", |
| ":component", |
| ] |
| } |