blob: 5985885f5783a415c4d1d8c58e87cfbc27181e3f [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")
rustc_binary("bin") {
name = "rolldice"
edition = "2018"
deps = [
":lib",
"//third_party/rust-crates/rustc_deps:rand",
"//third_party/rust-crates/rustc_deps:structopt",
]
}
rustc_library("lib") {
name = "rolldice_lib"
edition = "2018"
with_unit_tests = true
deps = [
"//third_party/rust-crates/rustc_deps:rand",
]
}
package("rolldice") {
deps = [
":bin",
]
binaries = [
{
name = "rolldice"
shell = true
},
]
meta = [
{
path = rebase_path("meta/rolldice.cmx")
dest = "rolldice.cmx"
},
]
}
package("rolldice-tests") {
testonly = true
deps = [
":lib",
]
tests = [
{
name = "rolldice_lib_lib_test"
},
]
}