| # 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. | |
| # Provides the core execution engine and framing adapters for the background | |
| # ffx-uart-driver host daemon. | |
| import("//build/host.gni") | |
| import("//build/rust/rustc_library.gni") | |
| if (is_host) { | |
| rustc_library("lib") { | |
| name = "uart_driver_impl" | |
| edition = "2024" | |
| with_unit_tests = true | |
| sources = [ | |
| "src/adapters.rs", | |
| "src/lib.rs", | |
| ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust_fdomain", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust_fdomain", | |
| "//src/developer/ffx/lib/safe_string:lib", | |
| "//src/developer/ffx/lib/uart_driver_api:lib", | |
| "//src/developer/ffx/tools/uart:lib", | |
| "//src/developer/lib/uart_fpl", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:libc", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:thiserror", | |
| "//third_party/rust_crates:tokio", | |
| ] | |
| test_deps = [ | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:tempfile", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":lib_test" ] | |
| } | |
| } else { | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":tests($host_toolchain)" ] | |
| } | |
| } |