blob: d2b398574cc36e83e72353eac0a98f58ba1fd9ff [file] [log] [blame]
# 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")
# [START imports]
import("//build/rust/rustc_binary.gni")
# [END imports]
# [START server]
rustc_binary("bin") {
name = "fidl_echo_rust_server"
edition = "2018"
deps = [
"//examples/fidl/fuchsia.examples:fuchsia.examples-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "src/main.rs" ]
}
# [END server]
# [START rest]
# Declare a component for the server, which consists of the manifest and the
# binary that the component will run.
fuchsia_component("echo-server") {
manifest = "server.cmx"
deps = [ ":bin" ]
}
# Declare a package that contains a single component, our server.
fuchsia_package("server") {
package_name = "echo-rust-server"
deps = [ ":echo-server" ]
}
# [END rest]