| # Copyright 2022 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/bazel/export_fuchsia_package_to_bazel.gni") |
| import("//build/components.gni") |
| import("//build/go/toolchain.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| rustc_binary("bin") { |
| testonly = true |
| output_name = "rust-impl" |
| output_dir = target_out_dir |
| edition = "2021" |
| source_root = "main.rs" |
| |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/tests/fidl/compatibility/fidl:fidl_import_rust", |
| "//src/tests/fidl/compatibility/fidl:fidl_service_rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "main.rs" ] |
| } |
| |
| fuchsia_component("impl") { |
| testonly = true |
| manifest = "meta/impl.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("rust") { |
| testonly = true |
| package_name = "fidl-compatibility-test-rust" |
| deps = [ ":impl" ] |
| } |
| |
| export_fuchsia_package_to_bazel("rust.bazel_input") { |
| testonly = true |
| package = ":rust" |
| } |