| # Copyright 2025 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. |
| |
| load("//build/tools/bazel2gn/bazel_rules:defs.bzl", "rustc_library") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| rustc_library( |
| name = "fuchsia-hyper", |
| srcs = [ |
| "src/lib.rs", |
| ] + select({ |
| "@platforms//os:fuchsia": [ |
| "src/fuchsia.rs", |
| "src/happy_eyeballs.rs", |
| ], |
| "//conditions:default": [ |
| "src/not_fuchsia.rs", |
| ], |
| }), |
| edition = "2021", |
| test_deps = [ |
| "//third_party/rust_crates/vendor:assert_matches", |
| ] + select({ |
| "@platforms//os:fuchsia": [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-sync", |
| "//third_party/rust_crates/vendor:test-case", |
| ], |
| "//conditions:default": [ |
| "//third_party/rust_crates/vendor:anyhow", |
| ], |
| }), |
| version = "0.1.0", |
| with_unit_tests = True, |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates/vendor:futures", |
| "//third_party/rust_crates/vendor:http", |
| "//third_party/rust_crates/vendor:hyper", |
| "//third_party/rust_crates/vendor:hyper-rustls", |
| "//third_party/rust_crates/vendor:rustls", |
| "//third_party/rust_crates/vendor:socket2", |
| "//third_party/rust_crates/vendor:tokio", |
| ] + select({ |
| "@platforms//os:fuchsia": [ |
| "//sdk/fidl/fuchsia.net.name:fuchsia.net.name_rust", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_rust", |
| "//sdk/rust/zx", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| "//src/lib/webpki-roots-fuchsia", |
| "//src/sys/lib/fidl-connector", |
| "//third_party/rust_crates/vendor:itertools", |
| "//third_party/rust_crates/vendor:pin-project", |
| ], |
| "//conditions:default": [ |
| "//src/developer/ffx/lib/netext:lib", |
| "//third_party/rust_crates/vendor:log", |
| "//third_party/rust_crates/vendor:rustls-native-certs", |
| ], |
| }), |
| ) |