{"repo":"rust-codegen-group/sigil-stitch","free":true,"listed":false,"github":"https://github.com/rust-codegen-group/sigil-stitch","clone":"git clone https://github.com/rust-codegen-group/sigil-stitch.git","description":"Type-safe, import-aware, width-aware code generation across multiple languages","language":"Rust","stars":284,"topics":["code-generation","codegen","multi-language","rust"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"sigil-stitch Type-safe, import-aware, width-aware code generation for multiple languages. sigil-stitch combines JavaPoet's builder + CodeBlock model with Wadler-Lindig pretty printing and multi-language support. Reference types with %T in format strings, and the library tracks every import for you, resolves naming conflicts, and emits width-aware formatted output. Quick Start Requires Rust edition 2024, MSRV 1.88.0. Runtime dependencies: pretty (Wadler-Lindig formatting), serde with derive (every spec type implements Serialize / Deserialize out of the box, so you can round-trip specs as JSON or YAML), and snafu (structured errors). Builder vs Macro sigil-stitch offers two ways to build code. Both produce the same CodeBlock with the same import tracking and rendering. Builder API -- programmatic, good for dynamic code generation: sigil quote! macro -- inline target-language code, less ceremony: The macro uses $T / $S / $N / $L / $C / $V / $W interpolation markers that expand to the equivalent %T / %S / %N / %L / %V format specifiers at compile time. It also supports $V(\"@{expr}\") for compile-time interpolation in verbatim strings, $attr(\"text\") for structural annotations with language-specific rendering, $T join(sep, iter) for type-name joins with per-item import tracking, $C each for splicing iterables of code blocks, $if / $else if / $else for meta-conditionals, $for for compile-time iteration, $let for Rust-level variable bindings, $join for separator-joined lists, and $+ f","default_branch":null,"files":null,"tree":[],"storefront":"/r/rust-codegen-group","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rust-codegen-group/sigil-stitch/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."}