| # Copyright 2022 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") |
| |
| rustc_library("netsvc-proto") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/connectivity/lib/net-declare", |
| "//src/connectivity/lib/net-types", |
| "//src/lib/const-unwrap", |
| "//src/lib/network/packet", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:arrayvec", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:unicase", |
| ] |
| |
| sources = [ |
| "src/debuglog.rs", |
| "src/lib.rs", |
| "src/netboot.rs", |
| "src/tftp.rs", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:assert_matches" ] |
| |
| configs -= [ "//build/config/rust:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("netsvc-proto-test") { |
| deps = [ ":netsvc-proto_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":netsvc-proto-test", |
| ":netsvc-proto_test($host_toolchain)", |
| ] |
| } |