blob: a7cfb050c304887304874db38a63fadc3f9f4a98 [file]
# Copyright 2026 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/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/rust:defs.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "http_sse",
srcs = [
"src/client.rs",
"src/client_server_tests.rs",
"src/event.rs",
"src/lib.rs",
"src/linealyzer.rs",
"src/server.rs",
"src/source.rs",
],
edition = "2024",
proc_macro_deps = [
"//third_party/rust_crates/vendor:derivative",
],
target_compatible_with = HOST_OS_CONSTRAINTS, # @bazel2gn:skip
test_deps = [
"//third_party/rust_crates/vendor:assert_matches",
"//third_party/rust_crates/vendor:proptest",
"//third_party/rust_crates/vendor:test-case",
] + select({
"@platforms//os:fuchsia": [
"//sdk/rust/zx",
"//src/lib/fuchsia-component",
],
"//conditions:default": [],
}),
visibility = [
"//src/sys/pkg/bin/pkg-resolver:__pkg__",
"//src/sys/pkg/lib/fuchsia-pkg-testing:__pkg__",
"//src/sys/pkg/lib/fuchsia-repo:__pkg__",
],
with_unit_tests = False, # @bazel2gn:raw_overwrite:true
deps = [
"//src/lib/fuchsia-hyper",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:http-body-util",
"//third_party/rust_crates/vendor:hyper",
"//third_party/rust_crates/vendor:hyper-util",
"//third_party/rust_crates/vendor:thiserror",
] + select({
"@platforms//os:fuchsia": [
"//sdk/fidl/fuchsia.net.http:fuchsia.net.http_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
],
"//conditions:default": [],
}),
)