| # Copyright 2022 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") |
| |
| assert(is_host, "The fho framework is for host tools only") |
| |
| rustc_library("lib") { |
| name = "fho" |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "macro:lib", |
| "//src/developer/ffx/command:lib", |
| "//src/developer/ffx/command/error:lib", |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/lib/fho/metadata:lib", |
| "//src/developer/lib/writer:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-lock", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/adapters.rs", |
| "src/fho_env.rs", |
| "src/from_env.rs", |
| "src/lib.rs", |
| "src/null_writer.rs", |
| "src/subtool.rs", |
| "src/subtool_suite.rs", |
| "src/try_from_env.rs", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":lib_test", |
| "macro:lib_test", |
| "metadata:lib_test", |
| ] |
| } |
| |
| group("fho") { |
| testonly = true |
| deps = [ |
| ":lib", |
| ":tests", |
| ] |
| } |