Practical Procedural Macros in Rust

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • substruct

  • This is super useful! I'm trying to write my first real, quite involved proc_macro library (https://github.com/martijnarts/smooth_grahpql), and getting an overview of what all is and isn't possible and where to start has been a pain.

  • proc-macro-workshop

    Learn to write Rust procedural macros  [Rust Latam conference, Montevideo Uruguay, March 2019]

  • I would very much second the suggestion to do David Tolnay’s Proc Macro Workshop if you want to start understanding how to write them. I’d been writing Rust for years but always kind of avoided proc macros.

    When I had a need for them, I went through only the first section of the workshop and everything clicked. You can just do the derive macro section and all the strange and scary-looking macro syntax will make sense. I realized that there is only a bit of extra syntax but it’s used very often so it can seem a little overwhelming when reading macro code.

    https://github.com/dtolnay/proc-macro-workshop

  • 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
  • prettyplease

    A minimal `syn` syntax tree pretty-printer

  • Nice blog, another very useful crate to use when working with proc-macro is https://github.com/dtolnay/prettyplease, for formatting generated code (very useful for debugging!), that does not bails out like rustfmt sometimes does.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • uv: An fast Python package installer and resolver, written in Rust

    1 project | news.ycombinator.com | 7 May 2024
  • Ruff: The Extensible Python Linter

    1 project | dev.to | 7 May 2024
  • Implement React v18 from Scratch Using WASM and Rust - [11] Implement Event System

    1 project | dev.to | 7 May 2024
  • An infinite canvas for code exploration

    1 project | news.ycombinator.com | 6 May 2024
  • Show HN: Rustubble – Beautifull CLI components for your terminal

    1 project | news.ycombinator.com | 5 May 2024