18 个版本 (5 个稳定版本)

1.2.1 2024 年 3 月 4 日
1.1.2 2024 年 2 月 14 日
1.0.0 2024 年 1 月 31 日
0.5.2 2024 年 1 月 28 日
0.3.7 2023 年 4 月 26 日

#229 in HTTP 服务器

Download history • Rust 包仓库 100/week @ 2024-03-11 • Rust 包仓库 15/week @ 2024-03-18 • Rust 包仓库 88/week @ 2024-04-01 • Rust 包仓库 9/week @ 2024-04-22 • Rust 包仓库 49/week @ 2024-05-20 • Rust 包仓库 45/week @ 2024-06-03 • Rust 包仓库 19/week @ 2024-06-10 • Rust 包仓库 20/week @ 2024-06-17 • Rust 包仓库 39/week @ 2024-06-24 • Rust 包仓库

每月 123 次下载
用于 8 crates

MIT 许可证

17KB
506

macros-rs

macros-rs 是一个简单、轻量级且实用的宏库。

入门指南

要开始,请查看 docs.rs 上的文档!

// main.rs
use macros_rs::{exp::ternary, fmt::fmtstr};

fn main() {
  let value = true;
  let hello = "hello";

  println!("{:?} world", ternary!(value, fmtstr!("{hello}"), ""));
}
$ cargo run
Compiling project (/crates)
Finished build [unoptimized + debuginfo] target(s)

"hello" world

依赖关系

~0–11MB
~117K SLoC