Rust Macros

Open-source Rust projects categorized as Macros

Top 23 Rust Macro Projects

  • derive_more

    Some more derive(Trait) options

  • nutype

    Rust newtype with guarantees πŸ‡ΊπŸ‡¦ πŸ¦€

  • Project mention: Nutype 0.4.0 released | /r/rust | 2023-11-23
  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rust-derive-builder

    derive builder implementation for rust structs

  • passerine

    A small extensible programming language designed for concise expression with little code.

  • macrokata

    Learn Macros In Rust

  • bitflags

    A macro to generate structures which behave like bitflags

  • rustgym

    Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • rust-cpp

    Embed C++ directly inside your rust code!

  • Project mention: Improving Interoperability Between Rust and C++ | news.ycombinator.com | 2024-02-05

    I am the current passive maintainer of the cpp crate: https://github.com/mystor/rust-cpp

  • rust-ctor

    Module initialization/global constructor functions for Rust

  • cynic

    A bring your own types GraphQL client library for Rust (by obmarg)

  • ormx

    bringing orm-like features to sqlx

  • syn-rsx

    syn-powered parser for JSX-like TokenStreams

  • Project mention: Hyper – A fast and correct HTTP implementation for Rust | news.ycombinator.com | 2023-05-12

    Any recommendations for rust template engines? I'd like something that can easily render labeled fragments of a template instead of requiring me to split a page into a dozen little files. Kinda like inline {{block}} definitions in Go's html/template. Speed is also nice.

    From template-benchmark-rs [0] I found sailfish [1] (fast, but no fragments(?)). render-rs [2] and syn-rsx [3] (2022) both let you write html in rust macros which is cool (maybe that can substitute for fragments?). Then there's gtmpl-rust [4] which is just Go templates reimplemented in rust.

    [0]: https://github.com/rosetta-rs/template-benchmarks-rs

    [1]: https://github.com/rust-sailfish/sailfish

    [2]: https://github.com/render-rs/render.rs last updated Jul 2020

    [3]: https://github.com/stoically/syn-rsx last updated Nov 2022

    [4]: https://github.com/fiji-flo/gtmpl-rust

  • rust-bitfield

    This crate provides macros to generate bitfield-like struct.

  • unseemly

    Macros have types!

  • prae

    prae is a crate that aims to provide a better way to define types that require validation.

  • lunchpad

    A macro application for Novation Launchpads - easy to use, feature rich

  • kinded

    Generate Rust enum variants without associated data

  • Project mention: Welcome kinded crate | /r/rust | 2023-08-08
  • rust-claim

    Assertion macros toolkit for Rust

  • born

    Remove code duplication from Struct and Enum with functional macros.

  • deriving_via

    Flexible deriving macro for new-type pattern.

  • throttle_my_fn

    A Rust attribute macro to limit a function's number of runs over a specified period of time

  • r4d

    A macro processor made with rust, which aims to be a modern alternative to m4 macro processor.

  • dl_api

    The easiest, simplest and safest way to load dynamic (shared object) libraries from Rust!

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Rust Macros related posts

Index

What are some of the best open-source Macro projects in Rust? This list will help you:

Project Stars
1 derive_more 1,397
2 nutype 1,206
3 rust-derive-builder 1,161
4 passerine 1,029
5 macrokata 985
6 bitflags 845
7 rustgym 835
8 rust-cpp 771
9 rust-ctor 663
10 cynic 335
11 ormx 275
12 syn-rsx 176
13 rust-bitfield 137
14 unseemly 128
15 prae 126
16 lunchpad 124
17 kinded 86
18 rust-claim 69
19 born 46
20 deriving_via 32
21 throttle_my_fn 12
22 r4d 10
23 dl_api 8

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com