| # 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") |
| |
| rustc_library("hoist") { |
| with_unit_tests = true |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc", |
| "//sdk/fidl/fuchsia.overnet.protocol:fuchsia.overnet.protocol-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| test_deps = [ "//third_party/rust_crates:parking_lot" ] |
| non_rust_deps = [ "//third_party/boringssl" ] |
| |
| sources = [ "src/lib.rs" ] |
| |
| inputs = [ |
| "//third_party/rust_crates/mirrors/quiche/quiche/examples/cert.crt", |
| "//third_party/rust_crates/mirrors/quiche/quiche/examples/cert.key", |
| "//third_party/rust_crates/mirrors/quiche/quiche/examples/rootca.crt", |
| ] |
| |
| if (is_fuchsia) { |
| deps += [ |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| sources += [ "src/fuchsia.rs" ] |
| test_deps += [ "//src/connectivity/overnet/lib/core" ] |
| } else { |
| deps += [ |
| "//src/connectivity/overnet/lib/core", |
| "//src/connectivity/overnet/lib/stream_link", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:async-net", |
| "//third_party/rust_crates:blocking", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:slab", |
| ] |
| test_deps += [ |
| "//src/connectivity/overnet/lib/ascendd", |
| "//third_party/rust_crates:scopeguard", |
| ] |
| sources += [ "src/not_fuchsia.rs" ] |
| } |
| } |
| |
| fuchsia_unittest_package("overnet-hoist-tests") { |
| manifest = "meta/hoist_lib_test.cml" |
| deps = [ |
| ":hoist_test", |
| "//src/connectivity/overnet/overnetstack:component", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":hoist_test($host_toolchain)", |
| ":overnet-hoist-tests", |
| ] |
| } |