Is `inlining` a function essentially the same thing as writing a macro?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern API for authentication & user identity.
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Onboard AI - ChatGPT with full context of any GitHub repo.
  • pot

    A concise, self-describing binary format written in Rust for Serde (by khonsulabs)

    In my serialization library Pot, there is a datatype that needs to store all possible numeric variants. I wanted that datatype to implement From for all types. Rather than needing to write an impl block for each one, I wrote a macro and then called it for each type.

  • bonsaidb

    A developer-friendly document database that grows with you, written in Rust

    In BonsaiDb, I define entire test suites as macros. This crate has a common trait that has multiple implementations in different crates. Each implementation needs to be tested thoroughly. For cargo test to be able to work in each crate independently, I needed to have the #[test]-annotated functions in the crate being built. By using a macro, I can define the functions in one location and invoke the macro in each crate to import the test suite into that crate.

  • WorkOS

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

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