blob: 9269288b47d73e85ec3e203d79271098e6526137 [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_proc_macro.bzl", "rustc_proc_macro")
package(default_applicable_licenses = ["//:license"])
rustc_proc_macro(
name = "trf_codegen_macro",
srcs = ["src/lib.rs"],
edition = "2024",
# GN rustc_macro implicitly builds in the host toolchain.
# @bazel2gn:skip
target_compatible_with = HOST_OS_CONSTRAINTS,
# Referenced by the trf_test GN template across the repository.
visibility = ["//:__subpackages__"],
deps = [
"//third_party/rust_crates/vendor:proc-macro2",
"//third_party/rust_crates/vendor:quote",
"//third_party/rust_crates/vendor:syn",
],
)
host_rustc_test(
name = "trf_codegen_macro_test",
crate = ":trf_codegen_macro",
)