| # 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. |
| |
| import("//build/host.gni") |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("usb_vsock") { |
| edition = "2024" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:zerocopy", |
| ] |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| |
| if (!is_host) { |
| test_deps += [ "//sdk/rust/zx" ] |
| } |
| |
| sources = [ |
| "src/connection.rs", |
| "src/connection/overflow_writer.rs", |
| "src/connection/pause_state.rs", |
| "src/lib.rs", |
| "src/packet.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("usb-vsock-target-tests") { |
| deps = [ ":usb_vsock_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":usb-vsock-target-tests", |
| ":usb_vsock_test", |
| ] |
| } |