Crates.io | macaroni |
lib.rs | macaroni |
version | 0.1.0 |
source | src |
created_at | 2023-11-29 01:59:27.691608 |
updated_at | 2023-11-29 01:59:27.691608 |
description | The missing macro std library for Rust |
homepage | https://github.com/4theL00z/macaroni |
repository | https://github.com/4theL00z/macaroni |
max_upload_size | |
id | 1052529 |
size | 39,560 |
Macaroni is the missing standard library for Rust macros! It provides a collection of useful macros that can be used in any Rust project. Macaroni is designed to be easy to use, easy to integrate, and easy to extend.
To start using Macaroni in your Rust project, add it as a dependency in your Cargo.toml:
[dependencies]
macaroni = "0.1.0"
The following macros are currently available in Macaroni:
collect!
The collect!
macro can be used to create a tuple, array, map, or vector from a list of values. For example:
use std::collections::HashMap;
use macaroni::collect;
fn main() {
let tuple: (u32, u32, u32) = collect![1, 2, 3];
println!("Tuple: {:?}", tuple);
let map: HashMap<&str, u32> = collect!["a" => 1, "b" => 2, "c" => 3];
}
For detailed documentation and a full list of available macros, please refer to our Documentation Page.
Macaroni is distributed under the terms of the GPL-3 license. See COPYING for details.