blob: 554aa37d43b2e09695a2d63cd6c3b466c43d4efd [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/rust/rustc_library.gni")
import("//build/rust/rustc_macro.gni")
if (is_host) {
rustc_macro("lib") {
name = "core_macros"
version = "0.1.0"
edition = "2021"
deps = [
":ffx_core_impl",
"//third_party/rust_crates:syn",
]
sources = [ "src/lib.rs" ]
}
# Implementation needs to be seperate for unit tests.
rustc_library("ffx_core_impl") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
source_root = "src/impl.rs"
deps = [
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol-rustc",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//src/lib/diagnostics/selectors",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:proc-macro2",
"//third_party/rust_crates:quote",
"//third_party/rust_crates:syn",
]
sources = [ "src/impl.rs" ]
}
}
group("tests") {
testonly = true
deps = [ ":ffx_core_impl_test($host_toolchain)" ]
}