blob: 150103fb3cef62ef72a7a2f1cef0e00f114c0266 [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/rules/packages:fx_package.bzl", "fx_package")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test")
load("//build/bazel/rules/testing:fx_test.bzl", "fx_test")
load("//build/bazel/rules/testing:fx_unittest_component.bzl", "fx_unittest_component")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "socket_parsing",
srcs = ["src/lib.rs"],
edition = "2024",
visibility = ["//src/sys/lib/elf_runner:__pkg__"],
deps = [
"//sdk/rust/zx",
"//src/lib/fuchsia-async",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:thiserror",
],
)
rustc_test(
name = "socket_parsing_lib_test",
crate = ":socket_parsing",
edition = "2024",
deps = ["//src/lib/fuchsia"],
)
fx_unittest_component(
name = "socket_parsing_tests_component",
binary = ":socket_parsing_lib_test",
component_name = "socket_parsing_tests",
)
fx_package(
name = "socket_parsing_tests_package",
package_name = "socket_parsing_tests",
testonly = True,
test_components = [":socket_parsing_tests_component"],
)
fx_test(
name = "socket_parsing_tests",
package = ":socket_parsing_tests_package",
)