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

#209 in HTTP server

Download history 218/week @ 2024-09-11 110/week @ 2024-09-18 77/week @ 2024-09-25 13/week @ 2024-10-02 10/week @ 2024-10-09 4/week @ 2024-10-16 1/week @ 2024-10-23 14/week @ 2024-10-30 6/week @ 2024-11-06 2/week @ 2024-11-13 8/week @ 2024-11-20 10/week @ 2024-11-27 55/week @ 2024-12-04 123/week @ 2024-12-11 14/week @ 2024-12-18 24/week @ 2024-12-25

217 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
~111K SLoC