blob: 1f6a6e952f42ec3a18dcd2b81951166b9770c915 [file] [log] [blame]
# Copyright 2019 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")
import("//build/sdk/sdk_documentation.gni")
# This list should only contain schemas that are currently exported outside of
# the Fuchsia source tree.
schemas = [
# "banjo_library.json",
"cc_prebuilt_library.json",
"cc_source_library.json",
"common.json",
"dart_library.json",
"data.json",
"device_profile.json",
"documentation.json",
"fidl_library.json",
"host_tool.json",
"loadable_module.json",
"manifest.json",
"sysroot.json",
]
sdk_documentation("meta") {
name = "metadata_schemas"
category = "partner"
files = []
foreach(schema, schemas) {
files += [
{
source = "//build/sdk/meta/$schema"
dest = "meta/schemas/$schema"
},
]
}
}
source_set("schemas") {
inputs = schemas
}
rustc_library("rust") {
name = "sdk_metadata"
with_unit_tests = true
edition = "2018"
deps = [
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:valico",
]
non_rust_deps = [ ":schemas" ]
sources = [
"src/banjo_library.rs",
"src/cc_prebuilt_library.rs",
"src/cc_source_library.rs",
"src/common.rs",
"src/dart_library.rs",
"src/data.rs",
"src/device_profile.rs",
"src/documentation.rs",
"src/fidl_library.rs",
"src/host_tool.rs",
"src/json.rs",
"src/lib.rs",
"src/loadable_module.rs",
"src/manifest.rs",
"src/sysroot.rs",
"src/testing.rs",
]
inputs = [
"host_tool.json",
"dart_library.json",
"fidl_library.json",
"documentation.json",
"cc_source_library.json",
"loadable_module.json",
"sysroot.json",
"cc_prebuilt_library.json",
"device_profile.json",
"data.json",
"manifest.json",
"banjo_library.json",
"common.json",
]
}