| # 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/rust/rustc_library.gni") |
| |
| assert(is_host, "The USB VSOCK host should only be built for the host OS") |
| assert(!is_mac, "The USB VSOCK host does not support Mac") |
| |
| rustc_library("lib") { |
| name = "usb_vsock_host" |
| edition = "2024" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/developer/lib/usb_vsock", |
| "//src/devices/bind/fuchsia.google.platform.usb:fuchsia.google.platform.usb_rust", |
| "//src/devices/bind/fuchsia.usb:fuchsia.usb_rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/usb_rs", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:thiserror", |
| ] |
| test_deps = [ "//src/lib/fuchsia" ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| group("usb_vsock_host") { |
| public_deps = [ ":lib" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lib_test" ] |
| } |