| # Copyright 2017 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("//src/sys/build/components.gni") |
| |
| rustc_library("fuchsia-component") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "tests:fuchsia.component.client.test-rustc", |
| "//garnet/lib/rust/never", |
| "//src/lib/fuchsia-async", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//third_party/rust_crates:matches", |
| ] |
| |
| sources = [ |
| "src/client.rs", |
| "src/lib.rs", |
| "src/server/mod.rs", |
| "src/server/service.rs", |
| "src/server/stream_helpers.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("fuchsia-component-unittests") { |
| executable_path = "bin/fuchsia_component_lib_test" |
| deps = [ ":fuchsia-component_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":fuchsia-component-unittests", |
| "tests", |
| ] |
| } |