blob: 202831f9b3032da811947a245cd5a694cbd211a8 [file] [log] [blame]
# Copyright 2020 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/host.gni")
import("//build/rust/rustc_binary.gni")
if (is_host) {
rustc_binary("create_bin") {
name = "create"
deps = [
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:handlebars",
"//third_party/rust_crates:heck",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_derive",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:termion",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:tempfile",
]
with_unit_tests = true
sources = [
"src/main.rs",
"src/template_helpers.rs",
"src/test_util.rs",
"src/util.rs",
]
}
}
install_host_tools("install") {
deps = [
":create_bin($host_toolchain)",
"templates($host_toolchain)",
]
outputs = [ "create" ]
}
group("create") {
deps = [ ":install" ]
}
group("tests") {
testonly = true
deps = [
":create_bin_test($host_toolchain)",
"goldens:tests",
]
}