blob: 82935e81e6f282409185738603134eff10ed1f8b [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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.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",
]
}
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",
]
# TODO(46853): Fix the leaks and remove this.
non_rust_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
package("vsock_service") {
deps = [ ":bin" ]
binary = "vsock_service"
meta = [
{
path = rebase_path("meta/vsock_service.cmx")
dest = "vsock_service.cmx"
},
]
}
test_package("vsock_service-tests") {
deps = [ ":lib_test" ]
tests = [
{
name = "vsock_service_lib_lib_test"
environments = basic_envs
},
]
}