From d555b1e96770406cbf3a7d8aeb56785dfb7ab8d4 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 7 Jun 2026 07:16:55 -0400 Subject: Prepare 0.1 release --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..56d6b19 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Feluments + +A macro to provide optional arguments to Rust. + +This crate works by providing a derive macro to implement builders for structs, +and also providing a macro as a shorthand for builders. + +```rust +use feluments::*; + +#[derive(Debug, PartialEq, Eq, Builder)] +#[builder(vis = pub)] +struct Foo { + #[builder(default = 45)] + x: i32, + #[builder(into)] + y: String, + #[builder(optional)] + z: () +} + +build!(Foo { x: 32, y: "baz" }), +``` + +The above `build!` macro expands to the following: + +```rust +Foo::builder().x(32).y("baz").build() +``` + +Although this library provides a `Builder` derive macro to make the `build!` +macro work, the `build!` macro is also compatible with other builder crates, +such as [bon](https://bon-rs.com/), [buildstructor](https://crates.io/crates/buildstructor), +or [typed-builder](https://crates.io/crates/typed-builder). + +## Contributing + +To contribute to this codebase, send your patch file to `botahamec@outlook.com`. -- cgit v1.2.3