blob: b34b8c1060adc5316b567295d1dbc80566e11da6 [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 = "2021"
deps = [
"//examples/fidl/fuchsia.examples:fuchsia.examples_rust",
"//src/lib/fuchsia",
"//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") {
component_name = "echo_server"
manifest = "meta/server.cml"
deps = [ ":bin" ]
}
# Declare a package that contains a single component, our server.
fuchsia_package("echo-rust-server") {
deps = [ ":echo-server" ]
}
# [END rest]