65 Repositories
Rust js-macros Libraries
Tiny macros for bailing on failure
tiny_bail Bailing is an error-handling pattern that takes the middle path between unwrap and ?: Compared to unwrap: Bail will return, continue, or bre
Rustato: A powerful, thread-safe global state management library for Rust applications, offering type-safe, reactive state handling with an easy-to-use macro-based API.
Rustato State Manager A generical thread-safe global state manager for Rust Introduction • Features • Installation • Usage • Advanced Usage • Api Refe
Simple procedural macros `tnconst![...]`, `pconst![...]`, `nconst![...]` and `uconst![...]` that returns the type level integer from `typenum` crate.
typenum-consts Procedural macros that take a literal integer (or the result of an evaluation of simple mathematical expressions or an environment vari
Create Streamdeck Macros For Helldivers 2 Strategems!
Helldivers 2 Stratagem Macro Engine For Streamdeck This program contains macros for various stratagems to use. All macros are contained in the macro_e
wait what? generate your entire infra from rust macros
infra as macro translate rust structs to terraform at compile time // your infra is a macro static DB: Postgres = Postgres16! { host: "env.host",
INput maCROs: program your keyboard/mouse
incro INput maCROs: program your keyboard/mouse See macro-template for macro example. Build it and place the resulting *.so file in macros/ directory
zink! is a library for developing ink! smart contracts with useful Rust macros that extend functionality and reduce boilerplate code.
zink! Smart Contract Macros This is a helper library for developing ink! smart contracts. It contains useful Rust macros that extend functionality and
What if we could check declarative macros before using them?
expandable An opinionated attribute-macro based macro_rules! expansion checker. Textbook example rustc treats macro definitions as some opaque piece o
Asynchronous runtime abstractions for implicit function decoloring.
decolor Asynchronous runtime abstractions for implicit function decoloring. Decolor is in beta Install | User Docs | Crate Docs | Reference | Contribu
Macros for candle-lora.
candle-lora-macro This library makes using candle-lora as simple as adding 2 macros to your model structs and calling a method! It is inspired by the
The api for interacting with `libinput_macros.nro`, along with the releases of the plugin.
Input Macros Plugin and API This plugin and related API implements a mechanism of assigning a complex series of button inputs and stick positions to a
Statically verified Rust struct field names as strings.
field Statically verified struct field names as strings. See the documentation for more details. Installation Add the following to your Cargo manifest
A HTML to node macro powered by rstml.
html-node A HTML to node macro powered by rstml. Features Text escaping Pretty-printing NEW: type-safe elements and attributes! (example) Example let
Proc-macros for generating icons from the Iconify API
iconify-rs This crate provides a macro to embed SVGs from Iconify. For a list of icons, see Iconify Icon Sets. 📝 Usage let svg = iconify::svg!("mdi:h
Write simple proc-macros inline with other source code.
script-macro An experimental way to write simple proc-macros inline with other source code. Did you ever end up getting frustrated at the boilerplate
Linux daemon to bind keys and macros to your controller's buttons
makima Makima is a daemon for Linux to bind your controller's buttons to key sequences and macros. Features: Configure your keybindings through a simp
Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase
utoipa_auto_discovery Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase Crate
Build Abstract Syntax Trees and tree-walking models quickly in Rust.
astmaker Build Abstract Syntax Trees and tree-walking models quickly in Rust. Example This example creates an AST for simple math expressions, and an
auto-rust is an experimental project that aims to automatically generate Rust code with LLM (Large Language Models) during compilation, utilizing procedural macros.
Auto Rust auto-rust is an experimental project that aims to automatically generate Rust code with LLM (Large Language Models) during compilation, util
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.
overloaded_literals Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali
Flexible deriving macro.
This library is a slightly more convenient version of derive for newtype pattern. = See also Deriving via Basic Usage #[derive(DerivingVia)] and then
A Rust crate providing utility functions and macros.
介绍 此库提供四类功能:异常处理、http post收发对象、格式转换、语法糖。 在 Cargo.toml 里添加如下依赖项 [dependencies.xuanmi_base_support] git = "https://github.com/taiyi-research-institute/x
Macros for redis-rs to serialize and deserialize structs automatically
redis-macros Simple macros and wrappers to redis-rs to automatically serialize and deserialize structs with serde. Installation To install it, simply
Prototype of the `std::io::ensure!` family of macros
io-ensure Prototype of the `std::io::ensure` family of macros API Docs | Releases | Contributing Installation $ cargo add io-ensure Safety This crate
Macro for fast implementing serialize methods in serde::Serializer trait
impl_serialize! This library provides a simple procedural macro for fast implementing serialize methods in serde::Serializer trait. [dependencies] imp
Croc-look is a tool to make testing and debuging proc macros easier
croc-look croc-look is a tool to make testing and debuging proc macros easier by these two features Printing the implementation specific generated cod
An experimental transpiler to bring tailwind macros to SWC 🚀
stailwc (speedy tailwind compiler) This is an experimental SWC transpiler to bring compile time tailwind macros to SWC (and nextjs) a-la twin macro. T
Helpful functions and macros for developing smart contracts on NEAR Protocol.
near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat
Helpful functions and macros for developing smart contracts on NEAR Protocol.
near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat
Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.
Bunt: simple macro-based terminal colors and styles bunt offers macros to easily print colored and formatted text to a terminal. It is just a convenie
Macros to make writing proc-macro crates easy
proc-easy Macros to make writing proc-macro crates easy. This crate provides mainly macros and supporting types and traits to reduce amount of boilerp
Provides Rust bindings for GTK libraries
gtk3-rs The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org. This
Provide expansion of proc-macros, in a way that rustc directs you directly to the issues at hand
expander Expands a proc-macro into a file, and uses a include! directive in place. Advantages Only expands a particular proc-macro, not all of them. I
Compiled string templates for Rust
templariusz Compiled string templates for Rust Usage See tests for detailed usage examples Basic example use templariusz::{template, Template}; #[tem
Atomic `dbg`/`eprintln`/`eprint` macros
atomic-dbg This crate provides dbg, eprint, and eprintln, macros which work just like their counterparts in std, but which: Write atomically, up to th
Lightweight parsing for Rust proc macros
Lightweight parsing for Rust proc macros Venial is a WIP parser for Rust proc macros. When writing proc macros that need to parse Rust code (such as a
Helper macros: autoimpl, impl_scope
Impl-tools A set of helper macros Macros Autoimpl #[autoimpl] is a variant of #[derive], supporting: explicit generic parameter bounds ignored fields
A series of utility macros for outputting testing results.
test-results A series of utility macros for outputting testing results. Getting Started Simply add the test-results crate to your project's Cargo.toml
Attribute for defining `macro_rules!` macros with proper visibility and scoping
macro-vis This crate provides an attribute for defining macro_rules! macros that have proper visibility and scoping. The default scoping and publicity
A library to generate syntax diagrams for Rust macros.
Live demo (code) A browser add-on for Firefox, Chrome and Edge A library to generate syntax ("railroad") diagrams for Rust's macro_rules!(). Diagrams
Learn to write Rust procedural macros [Rust Latam conference, Montevideo Uruguay, March 2019]
Rust Latam: procedural macros workshop This repo contains a selection of projects designed to learn to write Rust procedural macros — Rust code that g
Valq - macros for querying and extracting value from structured data by JavaScript-like syntax
valq valq provides a macro for querying and extracting value from structured data in very concise manner, like the JavaScript syntax. Look & Feel: u
Js-macros - Quickly prototype Rust procedural macros using JavaScript or TypeScript!
js-macros Quickly prototype Rust procedural macros using JavaScript or TypeScript! Have you ever thought "this would be a great use case for a procedu
PEG parser combinators using operator overloading without macros.
pom PEG parser combinators created using operator overloading without macros. Document Tutorial API Reference Learning Parser Combinators With Rust -
proc macros for generating mut and non-mut methods without duplicating code
mwt Hey! You! Read this before using! mwt was thrown together pretty quickly for personal use, because I couldn't find an existing crate that does thi
Macros that allow for implicit await in your async code.
suspend fn Disclaimer: this was mostly made as a proof of concept for the proposal below. I haven't tested if there is a performance cost to this macr
Example of structuring a proc macro crate for testability
testing-proc-macros Example of structuring a proc macro crate for testability. See accompanying blog post for details. License Licensed under either o
A Rust attribute macro to limit a function's number of runs over a specified period of time
throttle_my_fn: A Rust attribute macro to throttle the execution of functions throttle_my_fn is a Rust attribute macro to limit a function's number of
Simple console input macros with the goal of being implemented in the standard library.
Simple console input macros with the goal of being implemented in the standard library.
A metamacro toolkit for writing complex macros.
Big Mac This crate contains the branching_parser! metamacro, which can be used to create complex macros with few lines of code. To use the macro, call
Procedural macros for Floccus
floccus-proc Procedural macros for floccus This crate contains procedural attribute macros (currently only one) used by the floccus. But potentially c
Unwrap Macros to help Clean up code and improve production.
unwrap_helpers Unwrap Macros to help Clean up code and improve production. This does include a pub use of https://github.com/Mrp1Dev/loop_unwrap to ga
twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight.
Twilight interactions twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight. Note: This crate is not
A tiny crate mimicking Elixir's pipe operator for Rust without macros.
A small crate for using pipes in Rust.
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
todo-or-die provides procedural macros that act as checked reminders.
todo-or-die provides procedural macros that act as checked reminders.
Provides Rust bindings for GTK libraries
The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries
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
Pretend is a macros-based declarative Rust HTTP client
pretend is a modular, Feign-inspired HTTP, client based on macros. It's goal is to decouple the definition of a REST API from it's implementation.
Safe Rust --- GraalVM Polyglot bindings using procedural macros
The class macro is the primary way to generate bindings to Java types; it will generate a struct (with generics if specified) that implements Pass and Receive and has all the methods you give stubs for. The methods generated can be used like normal rust methods, however mutability is not enforced. The fully-qualified type name should precede a block containing method and constructor stubs. Java primitives like char, int, and byte are aliased to corresponding Rust types.
FeignHttp is a declarative HTTP client. Based on rust macros.
FeignHttp is a declarative HTTP client. Based on rust macros. Features Easy to use Asynchronous request Configurable timeout settings Suppor
Provides assert_eq! like macros with colorized diff output
similar-asserts similar-asserts is a crate that enhances the default assertion experience by using similar for diffing. It supports comparing either D
Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more
RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem
Extra iterator adaptors, iterator methods, free functions, and macros.
Itertools Extra iterator adaptors, functions and macros. Please read the API documentation here How to use with cargo: [dependencies] itertools = "0.1