blob: e4e434bd2c2ac46a21c7ab60e18ce2125e79d7b2 [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")
rustc_binary("bin") {
name = "rolldice"
edition = "2018"
deps = [
":lib",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:structopt",
]
sources = [ "src/main.rs" ]
}
rustc_library("lib") {
name = "rolldice_lib"
edition = "2018"
with_unit_tests = true
deps = [ "//third_party/rust_crates:rand" ]
sources = [ "src/lib.rs" ]
}
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"
},
]
}