blob: 0894599103f445ebb49a6f70d3ae083e1a6fec5d [file] [log] [blame]
# 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.internal:fuchsia.component.internal_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-url",
"//src/sys/component_manager/lib/router_error",
"//src/sys/lib/cm_config",
"//src/sys/lib/cm_moniker",
"//src/sys/lib/cm_rust",
"//src/sys/lib/cm_types",
"//src/sys/lib/component_id_index",
"//src/sys/lib/config_encoder",
"//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:serde",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
"//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",
]
test_deps = [
"//src/lib/fuchsia",
"//src/sys/lib/cm_rust/testing",
"//src/sys/lib/cm_types",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:maplit",
]
sources = [
"src/component_instance.rs",
"src/component_model.rs",
"src/environment.rs",
"src/lib.rs",
"src/route.rs",
]
}
group("tests") {
testonly = true
public_deps = [
":cm_fidl_analyzer_test($host_toolchain)",
"//tools/lib/cm_fidl_analyzer/tests($host_toolchain)",
]
}