blob: edc18c028266158727e1367cd21e3c2fd823fbe1 [file] [log] [blame]
# 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.
# NOTE: The comments that have [START/END ...] in them are used to identify code snippets that
# appear in the documentation. Please be aware that changes in these blocks will affect the
# documentation on fuchsia.dev.
import("//build/components.gni")
import("//build/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [ ":hello-world-rust-tests" ]
}
# [START rustc_tests]
rustc_binary("bin") {
name = "hello_world_rust"
# Generates the "bin_test" build target
with_unit_tests = true
edition = "2021"
deps = []
test_deps = [ "//src/lib/fuchsia" ]
sources = [ "src/main.rs" ]
}
# [END rustc_tests]
# [START fuchsia_component]
fuchsia_component("hello-world-rust-component") {
deps = [ ":bin" ]
component_name = "hello-world-rust"
manifest = "meta/hello_world_rust.cml"
}
# [END fuchsia_component]
# [START fuchsia_test]
fuchsia_unittest_package("hello-world-rust-tests") {
deps = [ ":bin_test" ]
}
# [END fuchsia_test]