| # Copyright 2020 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/host.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("cm_fidl_analyzer") { |
| with_unit_tests = true |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl-rustc", |
| "//sdk/fidl/fuchsia.component.internal:fuchsia.component.internal-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-url", |
| "//src/sys/lib/cm_moniker", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/moniker", |
| "//src/sys/lib/routing", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//third_party/rust_crates:anyhow", |
| "//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:thiserror", |
| "//third_party/rust_crates:url", |
| |
| # Depend on fuchsia_zircon_status crate instead of fuchsia_zircon so that this builds for host. |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| ] |
| sources = [ |
| "src/component_instance.rs", |
| "src/component_model.rs", |
| "src/environment.rs", |
| "src/lib.rs", |
| "src/node_path.rs", |
| "src/route.rs", |
| "src/serde_ext.rs", |
| ] |
| test_deps = [ |
| "//src/sys/lib/cm_rust/testing", |
| "//src/sys/lib/cm_types", |
| "//third_party/rust_crates:maplit", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":cm_fidl_analyzer_test($host_toolchain)", |
| "//tools/lib/cm_fidl_analyzer/tests($host_toolchain)", |
| ] |
| } |