blob: a4d62efac3f4a40b60b27cf127cd0981246377c7 [file] [log] [blame]
# Copyright 2024 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")
import("//build/rust/rustc_test.gni")
if (is_host) {
_deps = [
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
]
_sources = [ "src/main.rs" ]
rustc_binary("rust_extract") {
edition = "2021"
deps = _deps
sources = _sources
}
rustc_test("rust_extract_tests") {
edition = "2021"
deps = _deps
sources = _sources
source_root = "src/main.rs"
}
copy("install") {
sources = [ "$root_out_dir/rust_extract" ]
deps = [ ":rust_extract" ]
outputs = [ "$root_build_dir/host-tools/{{source_file_part}}" ]
}
group("tests") {
testonly = true
deps = [ ":rust_extract_tests" ]
}
}