| # 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/host.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_library("routing") { |
| with_unit_tests = true |
| edition = "2018" |
| |
| visibility = [ |
| "//src/security/scrutiny/lib/plugins/*", |
| "//src/sys/component_manager/*", |
| "//src/sys/lib/routing/*", |
| "//tools/lib/cm_fidl_analyzer/*", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component-rustc", |
| "//sdk/fidl/fuchsia.component.internal:fuchsia.component.internal-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.io2:fuchsia.io2-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//src/lib/error/clonable_error", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/from-enum", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//src/sys/lib/cm_fidl_validator", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/cm_types", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/capability_source.rs", |
| "src/collection.rs", |
| "src/component_instance.rs", |
| "src/config.rs", |
| "src/environment.rs", |
| "src/error.rs", |
| "src/filter.rs", |
| "src/lib.rs", |
| "src/mode_set.rs", |
| "src/policy.rs", |
| "src/rights.rs", |
| "src/router.rs", |
| "src/walk_state.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("fuchsia-routing-tests") { |
| v2 = true |
| deps = [ |
| ":routing_test", |
| "//src/sys/test_runners:tmp_storage", |
| ] |
| } |
| |
| group("host-routing-tests") { |
| testonly = true |
| public_deps = [ ":routing_test($host_toolchain)" ] |
| } |