| # 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/rust/rustc_library.gni") |
| |
| rustc_library("cml") { |
| name = "cml" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "macro", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/directed_graph", |
| "//src/lib/fidl/rust/fidl", |
| "//src/sys/lib/cm_fidl_validator", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/cm_types", |
| "//third_party/rust_crates:indexmap", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:json5format", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:serde_json5", |
| "//third_party/rust_crates:sha2", |
| "//tools/lib/config_value_file", |
| "//tools/lib/reference_doc", |
| ] |
| |
| test_deps = [ |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:difference", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| sources = [ |
| "src/error.rs", |
| "src/features.rs", |
| "src/lib.rs", |
| "src/one_or_many.rs", |
| "src/translate.rs", |
| "src/validate.rs", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":cml_test($host_toolchain)" ] |
| } |