| # Copyright 2021 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("config_client") { |
| edition = "2021" |
| with_unit_tests = true |
| sources = [ |
| "src/cpp.rs", |
| "src/fidl.rs", |
| "src/lib.rs", |
| "src/rust.rs", |
| ] |
| inputs = [ |
| "templates/cpp_elf.h.hbs", |
| "templates/cpp_elf.cc.hbs", |
| "templates/cpp_elf_hlcpp.cc.hbs", |
| "templates/cpp_driver.cc.hbs", |
| "templates/cpp_driver.h.hbs", |
| "templates/helpers.cc.hbs", |
| "templates/typedef.h.hbs", |
| "templates/vmo_parse.cc.hbs", |
| "templates/vmo_parse_helpers.cc.hbs", |
| ] |
| deps = [ |
| "//src/sys/lib/cm_rust", |
| "//third_party/rust_crates:handlebars", |
| "//third_party/rust_crates:proc-macro2", |
| "//third_party/rust_crates:quote", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:syn", |
| "//third_party/rust_crates:thiserror", |
| ] |
| test_deps = [ "//src/sys/lib/fidl_fuchsia_component_config_ext" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":config_client_test($host_toolchain)" ] |
| } |