blob: df9c9413bb229cc78e6130b71874459cfe5618d8 [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/rust:rustc_library.bzl", "rustc_library")
load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test")
load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "usb_vsock",
srcs = [
"src/connection.rs",
"src/connection/overflow_writer.rs",
"src/connection/pause_state.rs",
"src/lib.rs",
"src/packet.rs",
"src/transport.rs",
],
edition = "2024",
visibility = [
"//src/developer/ffx/lib/usb_driver_api:__pkg__",
"//src/developer/ffx/lib/usb_vsock_host:__pkg__",
"//src/developer/ffx/tools/usb_driver/impl:__pkg__",
"//src/developer/lib:__pkg__",
"//src/developer/remote-control/usb/usb-vsock-service:__pkg__",
],
deps = [
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-sync",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:zerocopy",
],
)
rustc_test(
name = "usb_vsock_test",
crate = ":usb_vsock",
edition = "2024",
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:test-case",
],
)
fx_unittest_package(
name = "usb-vsock-target-tests",
unit_tests = [":usb_vsock_test"],
)