| # 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/dist/resource.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_binary("echo_server_rust_bin") { |
| name = "echo_server_rust" |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/examples/fidl/services:echo-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| # Rename the executable to be consistent with the common manifest. |
| resource("echo_server_file") { |
| sources = [ "$root_out_dir/echo_server_rust" ] |
| outputs = [ "bin/echo_server" ] |
| deps = [ ":echo_server_rust_bin" ] |
| |
| # data_deps is necessary to include shared libraries in package. |
| data_deps = [ ":echo_server_rust_bin" ] |
| } |
| |
| fuchsia_component("echo-server-rust-cmp") { |
| deps = [ ":echo_server_file" ] |
| component_name = "echo_server_rust" |
| manifest = "../meta/echo_server.cmx" |
| } |
| |
| fuchsia_package("echo_server_rust") { |
| deps = [ ":echo-server-rust-cmp" ] |
| } |