blob: 82340a8d02344f88a41fd24b1866a79cae4dd6bd [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.
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "rolldice"
edition = "2018"
deps = [
":lib",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:structopt",
]
}
rustc_library("lib") {
name = "rolldice_lib"
edition = "2018"
with_unit_tests = true
deps = [
"//third_party/rust_crates:rand",
]
}
package("rolldice") {
deps = [
":bin",
]
binaries = [
{
name = "rolldice"
shell = true
},
]
meta = [
{
path = rebase_path("meta/rolldice.cmx")
dest = "rolldice.cmx"
},
]
}
unittest_package("rolldice-tests") {
deps = [
":lib_test",
]
tests = [
{
name = "rolldice_lib_lib_test"
environments = basic_envs
},
]
}