blob: 95bc9a93420cd382d86aeaf64ed5df730173ea2b [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 contents of this file have been copied into documentation located at
# //docs/development/languages/rust/testing.md. Please update the snippets
# in that file if the contents below are changed.
import("//build/rust/rustc_binary.gni")
import("//build/package.gni")
import("//build/test/test_package.gni")
group("rust") {
deps = [
":hello_world_rust"
]
}
group("tests") {
testonly = true
deps = [
":hello_world_rust_tests"
]
}
rustc_binary("bin") {
name = "hello_world_rust"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/public/rust/fuchsia-async",
]
}
package("hello_world_rust") {
deps = [
":bin",
]
binaries = [
{
name = "hello_world_rust"
}
]
meta = [
{
path = rebase_path("meta/hello_world_rust.cmx")
dest = "hello_world_rust.cmx"
},
]
}
test_package("hello_world_rust_tests") {
deps = [
":bin",
]
tests = [
{
name = "hello_world_rust_bin_test"
}
]
}