| # Copyright 2024 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") |
| |
| assert(is_host, "serdedoc is only available on the host toolchain") |
| |
| rustc_library("serdedoc") { |
| name = "serdedoc" |
| with_unit_tests = true |
| edition = "2021" |
| sources = [ |
| "src/data.rs", |
| "src/lib.rs", |
| "src/toc.rs", |
| ] |
| inputs = [ |
| "src/enum.hbs", |
| "src/main.hbs", |
| "src/primitive.hbs", |
| "src/struct.hbs", |
| "src/toc.hbs", |
| ] |
| deps = [ |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:camino", |
| "//third_party/rust_crates:handlebars", |
| "//third_party/rust_crates:schemars", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| ] |
| test_deps = [ "//third_party/rust_crates:pretty_assertions" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":serdedoc_test" ] |
| } |