blob: 8eeb73c7092912e2e6421314ee99a074d7fa707d [file] [log] [blame]
# Copyright 2020 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")
import("//build/rust/rustc_test.gni")
assert(is_host)
rustc_library("usb_rs") {
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fuchsia-sync",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:notify",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tokio",
]
sources = [
"src/bulk_interface.rs",
"src/lib.rs",
"src/usb_linux/discovery.rs",
"src/usb_linux/mod.rs",
"src/usb_linux/usbdevice_fs.rs",
]
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:tempfile",
]
deps += [
"//third_party/rust_crates:nix",
"//third_party/rust_crates:zerocopy",
]
}
group("tests") {
public_deps = [ ":usb_rs_test($host_toolchain)" ]
testonly = true
}