blob: 2c984dc47c7030f32bc39b99baf8fd5ad34ec8f9 [file] [log] [blame]
# 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/dist/resource.gni")
import("//build/rust/rustc_binary.gni")
group("client") {
testonly = true
deps = [
":hermetic_tests",
":package",
]
}
group("hermetic_tests") {
testonly = true
deps = [ ":calculator-client-rust-unittests" ]
}
rustc_binary("bin") {
output_name = "calculator_client"
with_unit_tests = true
edition = "2021"
deps = [
"//examples/fidl/calculator/fidl:calculator_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:log",
"//third_party/rust_crates:nom",
]
test_deps = [ "//third_party/rust_crates:futures" ]
sources = [
"src/main.rs",
"src/parse.rs",
]
}
fuchsia_component("component") {
component_name = "client"
manifest = "meta/client.cml"
deps = [ ":bin" ]
}
fuchsia_package("package") {
package_name = "client"
deps = [ ":component" ]
}
fuchsia_unittest_package("calculator-client-rust-unittests") {
deps = [ ":bin_test" ]
}