Rust Macros

Open-source Rust projects categorized as Macros Edit details

Top 16 Rust Macro Projects

  • passerine

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

    Project mention: Passerine: A small functional scripting language with macros, powered by Rust | news.ycombinator.com | 2022-04-20
  • derive_more

    Some more derive(Trait) options

    Project mention: Microsoft re-adds .NET hot-reload | news.ycombinator.com | 2021-10-23

    tl;dr you can put commit hashes in the place where the parent comment put tags.

    The PR interface actually exposes this for force-pushes, but the UI discovery for this is horrible. It turns out that the "force-pushed" part in the little message in the github UI is actually a link. This link points to the diff between the old and the new HEAD of the branch.

    As an example you can look at this PR:

    It has this little message somewhere down the page:

    Monadic-Cat force-pushed the add-unwrap branch from e130dbe to 25235aa 4 months ago

    If you then click that link you go to the "compare" page, which shows the diff between the two commits:

    https://github.com/JelteF/derive_more/compare/e130dbe6b2a429...

    Disclaimer: I'm a Micrsoft employe, but don't work on Github. I'm a daily user of Github though.

  • JetBrains

    Developer Ecosystem Survey 2022. Take part in the Developer Ecosystem Survey 2022 by JetBrains and get a chance to win a Macbook, a Nvidia graphics card, or other prizes. We’ll create an infographic full of stats, and you’ll get personalized results so you can compare yourself with other developers.

  • rust-derive-builder

    derive builder implementation for rust structs

  • rust-cpp

    Embed C++ directly inside your rust code!

    Project mention: Tired of safe programming? Embed C directly in your Rust code | reddit.com/r/programming | 2022-02-24

    Here is a more serious project that allows to embed C++ code directly in your Rust code: https://github.com/mystor/rust-cpp

  • bitflags

    A macro to generate structures which behave like bitflags

    Project mention: What would you change about bitflags? | reddit.com/r/rust | 2021-10-25

    I’m collecting input in this issue if there’s anything you’d like to see done. I’m keen to hear about any burning issues you’ve run into!

  • rustgym

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

    Project mention: Beginner comprehensive resources on Rust | reddit.com/r/rust | 2022-02-26

    you can start with https://doc.rust-lang.org/rust-by-example/ then try some problems in https://rustgym.com/

  • rust-ctor

    Module initialization/global constructor functions for Rust

    Project mention: How do you have a library call a generator macro? | reddit.com/r/rust | 2021-12-18

    For context, see rust issue #47384 and ctor issue #27.

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • ormx

    bringing orm-like features to sqlx

    Project mention: Actix Web v4.0 (Rust) | news.ycombinator.com | 2022-02-25

    I think there are quite some macros that accelerate a CRUD creation app, for example, take a look at sqlx with ormx: https://github.com/NyxCode/ormx

  • unseemly

    Macros have types!

    Project mention: Peridot: A functional language based on two-level type theory | reddit.com/r/ProgrammingLanguages | 2022-05-10

    Did you take a look at paul stansifer's unseemly? https://github.com/paulstansifer/unseemly cc /u/paul_stansifer

  • rust-bitfield

    This crate provides macros to generate bitfield-like struct.

  • syn-rsx

    syn-powered parser for JSX-like TokenStreams

  • born

    Remove code duplication from Struct and Enum with functional macros.

  • dl_api

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

    Project mention: Idea for project: safe-ffi | reddit.com/r/rust | 2022-02-09
  • throttle_my_fn

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

    Project mention: throttle_my_fn: An attribute macro to throttle your functions for rate-limiting | reddit.com/r/rust | 2021-11-18

    Crate - Docs - Github

  • smallnum

    Compile-time size optimization for numeric primitives.

    Project mention: "smallnum" crate: compile-time size optimization for numeric primitives | reddit.com/r/rust | 2021-06-27

    Thus, this crate provides a macro to automatically determine the smallest integer type that can "fit" a constant max. When the size of a backing collection is known at compile-time (e.g. when using crates like `smallvec` for `!#[no_std]` development), this compile-time optimization can help save precious bytes - potentially for every node in an index-based structure (see README examples). Currently supports signed and unsigned numbers, but I’d love help with floating point support if anyone has ideas (though I don't know what a realistic usecase would be :P).

  • r4d

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

    Project mention: R4d, a m4 macro alternative | reddit.com/r/opensource | 2022-06-17
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). The latest post mention was on 2022-06-17.

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 passerine 949
2 derive_more 888
3 rust-derive-builder 750
4 rust-cpp 601
5 bitflags 559
6 rustgym 407
7 rust-ctor 368
8 ormx 179
9 unseemly 121
10 rust-bitfield 103
11 syn-rsx 53
12 born 20
13 dl_api 7
14 throttle_my_fn 7
15 smallnum 5
16 r4d 4
Find remote jobs at our new job board 99remotejobs.com. There are 4 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
www.sonarqube.org