125 Repositories
Rust proc-macro-workshop Libraries
assay - A super powered testing macro for Rust
assay - A super powered testing macro for Rust as·say /ˈaˌsā,aˈsā/ noun - the testing of a metal or ore to determine its ingredients and quality. Rust
Macro for stating unsafe assumptions in Rust.
assume A macro for stating unsafe assumptions in Rust. Using this macro, one can supply assumptions to the compiler for use in optimization. These ass
Rust derive macros for automating the boring stuff.
derived: Macros for automating the boring stuff The derived crate provides macros that can simplify all the boring stuff, like writing constructors fo
Attribute macro that generates negated versions of`is_something` functions
negate negate is a simple attribute macro that negates a given function. Usage #[negate] Given a function of the form is_* that returns a boolean valu
This crate defines a single macro that is a brainfunct compile-time interpreter.
Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18
A fully-featured lexer generator, implement as a proc macro
lexgen: A fully-featured lexer generator, implemented as a proc macro lexer! { // First line specifies name of the lexer and the token type return
atttribute macro for running a flaky test multiple times
flaky_test This attribute macro will register and run a test 3 times, erroring only if all three times fail. Useful for situations when a test is flak
Obake is a procedural macro for declaring and maintaining versioned data-structures.
Obake is a procedural macro for declaring and maintaining versioned data-structures. The name 'obake' is taken from the Japanese 'お化け (おばけ)', a class of supernatural beings in Japanese folklore that shapeshift.
zero runtime cost default arguments in rust
Default Arguments in Rust Enables default arguments in rust by macro in zero cost. Just wrap function with default_args! and macro with name of functi
The nightly_crimes!{} macro commits horrible crimes to allow you to enable nightly features on the stable compiler.
The nightly_crimes!{} macro commits horrible crimes to allow you to enable nightly features on the stable compiler.
This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.
prae This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you spec
concat-arrays: a rust macro for concatenating fixed-size arrays
concat-arrays: a rust macro for concatenating fixed-size arrays This crate defines concat_arrays!, a macro that allows you to concatenate arrays.
A copypastable guide to implementing simple derive macros in Rust.
A copypastable guide to implementing simple derive macros in Rust. The goal Let's say we have a trait with a getter trait MyTrait {
Parsing and inspecting Rust literals (particularly useful for proc macros)
litrs: parsing and inspecting Rust literals litrs offers functionality to parse Rust literals, i.e. tokens in the Rust programming language that repre
A Rust macro for writing nested loop expressions
loop_chain A Rust macro for writing nested loop expressions Usage | Examples | Docs Dependencies [dependencies] loop_chain = "0.1.1" Usage For express
An LR parser generator, implemented as a proc macro
parsegen parsegen is an LR parser generator, similar to happy, ocamlyacc, and lalrpop. It currently generates canonical LR(1) parsers, but LALR(1) and
⚙️ Workshop Publishing Utility for Garry's Mod, written in Rust & Svelte and powered by Tauri
⚙️ gmpublisher Currently in Beta development. A powerful and feature-packed Workshop publisher for Garry's Mod is finally here! Click for downloads Ar
A Rust macro for writing regex pattern matching.
regexm A Rust macro for writing regex pattern matching.
proc-macro for accessing struct field names at runtime
field_names field_names is a Rust crate to expose a field or variant names from source code as strings at runtime. Example Consider a simple struct su
Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
Rust Embed Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev. Y
A macro-based html builder for rust
Horrorshow A macro-based html templating library, compatible with stable rust (currently requires rust = 1.37). Features This crate will degrade grac
:pencil: Compile-time HTML templates for Rust
maud Documentation (source) • API reference • Change log Maud is an HTML template engine for Rust. It's implemented as a macro, html!, which compiles
hado-rshado — A little macro for writing haskell-like do expressions without too much ceremony
hado Monadic haskell-like expressions brought to rust via the hado! macro What? A little macro for writing haskell-like do expressions without too muc
Macro for Python-esque comprehensions in Rust
Cute Macro for Python-esque list comprehensions in Rust. The c! macro implements list and hashmap comprehensions similar to those found in Python, all
Subcommand to show result of macro expansion
cargo-expand Once installed, the following command prints out the result of macro expansion and #[derive] expansion applied to the current crate. $ ca