{"repo":"fast/macroweave","free":true,"listed":false,"github":"https://github.com/fast/macroweave","clone":"git clone https://github.com/fast/macroweave.git","description":"Table-driven Rust code templates.","language":"Rust","stars":12,"topics":["proc-macro","rust-lang","template"],"license":"Apache-2.0","category":"saas-starters-boilerplates","readme_excerpt":"macroweave [![Crates.io][crates-badge]][crates-url] [![Documentation][docs-badge]][docs-url] [![MSRV 1.85][msrv-badge]](https://www.whatrustisit.com) [![Apache 2.0 licensed][license-badge]][license-url] [![Build Status][actions-badge]][actions-url] [crates-badge]: https://img.shields.io/crates/v/macroweave.svg [crates-url]: https://crates.io/crates/macroweave [docs-badge]: https://img.shields.io/docsrs/macroweave [docs-url]: https://docs.rs/macroweave [msrv-badge]: https://img.shields.io/badge/MSRV-1.85-green?logo=rust [license-badge]: https://img.shields.io/crates/l/macroweave [license-url]: https://www.apache.org/licenses/LICENSE-2.0 [actions-badge]: https://github.com/fast/macroweave/workflows/CI/badge.svg [actions-url]: https://github.com/fast/macroweave/actions?query=workflow%3ACI macroweave provides procedural macros for generating repeated Rust code from compact, table-driven inputs. Motivation macroweave is for repetition that has to become Rust syntax, not runtime control flow. You write the choices once, name the columns, and use those names in Rust syntax. That is the table-driven case macroweave is built around: This cannot be written as an ordinary for-loop because Ty and Width need to be substituted as tokens before the generated code is type-checked. Whole-body repetition Without splice syntax, [ repeat! ] emits the whole body once per input row: Partial repetition When only part of a surrounding construct should repeat, use [ splice! ] and put that part in #( ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fast","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fast/macroweave/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}