| # Copyright 2026 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("sync_io_client") { |
| # Visibility is restricted to Starnix because it is usually preferable to just use the standard |
| # library (which uses fdio and zxio). This is used in Starnix for performance and memory reasons. |
| visibility = [ |
| ":*", |
| "//src/starnix/kernel/core:*", |
| ] |
| |
| edition = "2024" |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-sync", |
| "//src/starnix/lib/syncio", |
| "//third_party/rust_crates:smallvec", |
| "//third_party/rust_crates:zerocopy", |
| ] |
| with_unit_tests = true |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| fuchsia_unittest_package("sync-io-client-tests") { |
| deps = [ ":sync_io_client_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":sync-io-client-tests" ] |
| } |