| # 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/rust/rustc_library.gni") | |
| if (is_host) { | |
| rustc_library("lib") { | |
| name = "uart_driver_api" | |
| edition = "2024" | |
| with_unit_tests = true | |
| deps = [ | |
| "//src/developer/ffx/config:lib", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:sha2", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| test_deps = [ | |
| "//src/developer/ffx/config:lib", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:tempfile", | |
| ] | |
| sources = [ | |
| "src/errors.rs", | |
| "src/lib.rs", | |
| ] | |
| } | |
| group("uart_driver_api") { | |
| public_deps = [ ":lib" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":lib_test" ] | |
| } | |
| } else { | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":tests($host_toolchain)" ] | |
| } | |
| } |