18 releases (5 stable)

1.2.1 Mar 4, 2024
1.1.2 Feb 14, 2024
1.0.0 Jan 31, 2024
0.5.2 Jan 28, 2024
0.3.7 Apr 26, 2023

#199 in HTTP server

Download history 4/week @ 2023-12-15 32/week @ 2023-12-29 1/week @ 2024-01-05 4/week @ 2024-01-12 3/week @ 2024-01-19 9/week @ 2024-01-26 109/week @ 2024-02-09 37/week @ 2024-02-16 67/week @ 2024-02-23 245/week @ 2024-03-01 114/week @ 2024-03-08 29/week @ 2024-03-15 7/week @ 2024-03-22 178/week @ 2024-03-29

342 downloads per month
Used in 8 crates

MIT license

17KB
506 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–13MB
~133K SLoC