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

#282 in HTTP server

Download history 7/week @ 2024-11-28 88/week @ 2024-12-05 96/week @ 2024-12-12 12/week @ 2024-12-19 20/week @ 2024-12-26 2/week @ 2025-01-02 23/week @ 2025-01-09 10/week @ 2025-01-16 20/week @ 2025-01-23 39/week @ 2025-01-30 41/week @ 2025-02-06 94/week @ 2025-02-13 9/week @ 2025-02-20 24/week @ 2025-02-27 15/week @ 2025-03-06 37/week @ 2025-03-13

85 downloads per month
Used in 10 crates (9 directly)

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
~106K SLoC