15 releases (2 stable)

1.4.1 Sep 10, 2024
1.2.1 Mar 4, 2024
0.5.2 Jan 28, 2024
0.5.0 Dec 3, 2023
0.4.0 Apr 26, 2023

#203 in HTTP server

Download history 84/week @ 2024-09-17 102/week @ 2024-09-24 24/week @ 2024-10-01 11/week @ 2024-10-08 4/week @ 2024-10-15 13/week @ 2024-10-29 8/week @ 2024-11-05 9/week @ 2024-11-19 10/week @ 2024-11-26 7/week @ 2024-12-03 169/week @ 2024-12-10 15/week @ 2024-12-17 26/week @ 2024-12-24

214 downloads per month
Used in 9 crates

MIT license

18KB
557 lines

macros-rs

macros-rs is a simple, lightweight, and useful library for miscellaneous macros.

Getting Started

To get started check out the docs on 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

Dependencies

~0–10MB
~105K SLoC