blob: 47033ab26ba85e919545f0eb3a8c89ca9cac9996 [file]
# Copyright 2026 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.
load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test")
load("//build/bazel/rules/rust:rustc_binary.bzl", "rustc_binary")
package(default_applicable_licenses = ["//:license"])
rustc_binary(
name = "trf_codegen_bin",
srcs = [
"src/consistency_checker.rs",
"src/generator.rs",
"src/main.rs",
"src/parser.rs",
],
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
# Referenced by the trf_test GN template across the repository.
visibility = ["//:__subpackages__"],
deps = [
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:handlebars",
"//third_party/rust_crates/vendor:quote",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:syn",
],
)
host_rustc_test(
name = "trf_codegen_bin_test",
crate = ":trf_codegen_bin",
)