Skip to main content

Crate tweld

Crate tweld 

Source
Expand description

§Tweld

Crates.io Docs.rs License CI

You can read it as tiny-weld, token-weld, or just tweld. The important thing is that it compiles.

Tweld is a procedural macro toolkit and naming DSL for Rust. It lets you dynamically generate, modify, and compose identifiers directly in your source code using a clean @[] syntax — because sometimes the identifier you need doesn’t quite exist yet, and writing a full proc-macro just to rename a function feels like bringing a freight train to post a letter. One can only hope the syntax is clean and intuitive enough.

weld!("## @[(the idea | title)]");

The name comes from the idea of fusing tokens together. It started as a tool for writing macros for macros (which sounds recursive, because it is), and then grew somewhat beyond its original remit. See weld! for full documentation.

Macros§

weld
Weld