blob: 0150ce9b2a8190ac205e39c5e88f1ccbdf27d07f [file] [log] [blame]
# Copyright 2018 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_binary.gni")
import("//build/rust/rustc_library.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
name = "vsock_service"
edition = "2018"
deps = [
":lib",
"//sdk/fidl/fuchsia.hardware.vsock:fuchsia.hardware.vsock-rustc",
"//sdk/fidl/fuchsia.vsock:fuchsia.vsock-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:void",
]
sources = [ "src/main.rs" ]
}
rustc_library("lib") {
name = "vsock_service_lib"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.hardware.vsock:fuchsia.hardware.vsock-rustc",
"//sdk/fidl/fuchsia.vsock:fuchsia.vsock-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:crossbeam",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:void",
]
sources = [
"src/addr.rs",
"src/lib.rs",
"src/port.rs",
"src/service.rs",
]
}
fuchsia_package_with_single_component("vsock_service") {
manifest = "meta/vsock_service.cmx"
deps = [ ":bin" ]
}
fuchsia_unittest_package("vsock_service-tests") {
deps = [ ":lib_test" ]
}