5 releases (3 breaking)
0.4.1 | Nov 20, 2023 |
---|---|
0.4.0 | Nov 20, 2023 |
0.3.0 | Nov 20, 2023 |
0.2.0 | Nov 12, 2023 |
0.1.1 | Nov 11, 2023 |
#495 in Procedural macros
18KB
349 lines
About tiaojian-macro
tiaojian-macro 是使用过程宏进行条件编译的工具包,目前实现了项目中已激活的 package 的检测。
Example
#![feature(proc_macro_hygiene)]
use tiaojian_macro::tiaojian;
fn main() {
#[tiaojian(is_active("sqlx", "sqlx-mysql"))]
println!("sqlx and sqlx-mysql are actived");
#[tiaojian(is_active("sqlx", "sqlx-sqlite"))]
println!("sqlx and sqlx-sqlite are actived");
}
Dependencies
~1.2–2.1MB
~43K SLoC