|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2025 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +load("@rules_rust//rust:defs.bzl", "rust_proc_macro", "rust_test") |
| 14 | + |
| 15 | +rust_proc_macro( |
| 16 | + name = "mw_log_fmt_macro", |
| 17 | + srcs = glob(["*.rs"]), |
| 18 | + # TODO: expose required interface through `mw_log` and make it private again. |
| 19 | + # visibility = ["//visibility:private"], |
| 20 | + visibility = ["//visibility:public"], |
| 21 | + deps = [ |
| 22 | + "//src/log/mw_log_fmt", |
| 23 | + "@score_crates//:proc_macro2", |
| 24 | + "@score_crates//:quote", |
| 25 | + "@score_crates//:syn", |
| 26 | + ], |
| 27 | +) |
| 28 | + |
| 29 | +rust_test( |
| 30 | + name = "tests", |
| 31 | + srcs = glob(["tests/**/*.rs"]), |
| 32 | + proc_macro_deps = [ |
| 33 | + "//src/log/mw_log_fmt_macro", |
| 34 | + ], |
| 35 | + tags = [ |
| 36 | + "unit_tests", |
| 37 | + "ut", |
| 38 | + ], |
| 39 | + deps = [ |
| 40 | + "//src/log/mw_log_fmt", |
| 41 | + ], |
| 42 | +) |
0 commit comments