blob: 13bc80b2d668f4c76a16b1621c7f58ab8c51a6e3 [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/components.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_macro.gni")
rustc_macro("net-declare-macros") {
source_root = "src/macros.rs"
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//src/connectivity/lib/net-types",
"//third_party/rust_crates:proc-macro2",
"//third_party/rust_crates:quote",
# FIXME(https://fxbug.dev/332277415): Please update to syn 2.x.
# "//third_party/rust_crates:syn",
"//third_party/rust_crates:syn-v1_0_98",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//third_party/rust_crates:assert_matches" ]
sources = [ "src/macros.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
rustc_library("net-declare") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [ ":net-declare-macros" ]
test_deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net_rust",
"//src/connectivity/lib/net-types",
]
sources = [ "src/lib.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("net-declare-tests") {
deps = [ ":net-declare_test" ]
}
group("tests") {
testonly = true
deps = [
":net-declare-macros_test",
":net-declare-tests",
]
}