| # Copyright 2019 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_test.gni") |
| |
| # Build the library. |
| rustc_library("ppp_packet") { |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/network/packet", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/ipv4.rs", |
| "src/ipv6.rs", |
| "src/lib.rs", |
| "src/link.rs", |
| "src/records.rs", |
| ] |
| } |
| |
| rustc_test("ppp_packet_test_bin") { |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/network/packet", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/ipv4.rs", |
| "src/ipv6.rs", |
| "src/lib.rs", |
| "src/link.rs", |
| "src/records.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("ppp-packet-tests") { |
| deps = [ ":ppp_packet_test_bin" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |