blob: 570c76497eb8cf43c859f194cb6c464472471554 [file] [log] [blame] [edit]
# 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/components.gni")
import("//build/rust/rustc_binary.gni")
group("server") {
testonly = true
deps = [
":package",
":tests",
]
}
group("tests") {
testonly = true
deps = [ ":calculator-server-rust-unittests" ]
}
rustc_binary("bin") {
output_name = "calculator_server"
with_unit_tests = true
edition = "2021"
deps = [
"//examples/fidl/calculator/fidl:calculator_rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [ "//src/lib/fidl/rust/fidl" ]
sources = [ "src/main.rs" ]
}
fuchsia_component("component") {
component_name = "server"
manifest = "meta/server.cml"
deps = [ ":bin" ]
}
fuchsia_package("package") {
package_name = "server"
deps = [ ":component" ]
}
fuchsia_unittest_package("calculator-server-rust-unittests") {
deps = [ ":bin_test" ]
}