pfr VS nanoserde

Compare pfr vs nanoserde and see what are their differences.

pfr

std::tuple like methods for user defined types without any macro or boilerplate code (by boostorg)

nanoserde

Serialisation library with zero dependencies (by not-fl3)
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
pfr nanoserde
4 3
1,263 559
1.0% -
7.9 6.8
17 days ago 14 days ago
C++ Rust
Boost Software License 1.0 -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

pfr

Posts with mentions or reviews of pfr. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-23.
  • Rooting for P1061 "Structured Bindings can introduce a Pack"
    1 project | /r/cpp | 19 Oct 2023
    This single feature opens a world of new possiblities. For example, it makes implementing "getting the number of fields" trivial. Furthrmore, and much more importantly, it enables turning a struct into a tuple. Currently, this can only be done by enumerating cases (therefore it's not fully generic), as with Boost PFR. By the way, PFR greatly simplifies our codebases, especially for parts with serialization and/or reflection.
  • Minimum viable declarative GUI in C++
    3 projects | /r/cpp | 23 Mar 2022
    The code is relatively short and can be groked with a few coffees: https://github.com/boostorg/pfr/tree/develop/include/boost/pfr ; if you're using C++17 it uses a binary search (https://github.com/boostorg/pfr/blob/develop/include/boost/pfr/detail/fields_count.hpp) to count the number of fields in a struct, by starting by the observation that a likely majorant on the number of fields in a struct is sizeof(the struct) * CHAR_BIT, assuming not too many [[no_unique_address]] tomfooleries. Then once this count is known it's possible to simply map them as a tuple through sheer brute force and destructuring: https://github.com/boostorg/pfr/blob/develop/include/boost/pfr/detail/core17_generated.hpp
  • The Serde Rust Framework
    14 projects | news.ycombinator.com | 14 Oct 2021
    I wonder if the c++ approach of boost.pfr would be portable to rust ? It allows reflection on aggregates without needing to annotate anything: https://github.com/boostorg/pfr
  • Counting the number of fields in an aggregate in C++20
    2 projects | /r/cpp | 14 Mar 2021
    It is an 'interesting' meta-programming problem though (wasted many weeks on it myself, fixed a small gcc bug - a 'uniform init' edge case and filed an issue with magic_get Reflecting array members of aggregate structs).

nanoserde

Posts with mentions or reviews of nanoserde. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-10.
  • venial 0.1 - A lightweight alternative to syn
    5 projects | /r/rust | 10 Mar 2022
    what do you think of the parser in nanoserde? https://github.com/not-fl3/nanoserde/blob/master/derive/src/parse.rs
  • How to speed up the Rust compiler in 2022
    7 projects | /r/rust | 24 Feb 2022
    Yeah proc macros have a massive hole in their user experience. Nobody actually wants to use them without syn + quote functionality, so the majority of people just pay the compile time cost of syn/quote/procmacro2. But then a subset of people can't afford to pay the compile time cost, so they either: 1. Don't use them. And remove all of their deps that use them ... which is generally a lot. 2. Hand-manage the TokenStream (which is very much not fun). Macroquad doesn't want syn + quote in their tree because they care _deeply about compile times, so they opted to re-implement serde. Serde is the crowned jewel of the rust ecosystem. Someone feeling unable to use it is a massive failure of the system.
  • The Serde Rust Framework
    14 projects | news.ycombinator.com | 14 Oct 2021

What are some alternatives?

When comparing pfr and nanoserde you can also consider the following projects:

Magic Enum C++ - Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code

miniserde - Data structure serialization library with several opposite design goals from Serde

magic_get - std::tuple like methods for user defined types without any macro or boilerplate code

serde_v8 - Moved to https://github.com/denoland/deno

MLV-App - All in one MLV processing app.

serde - Serialization framework for Rust

ComLightInterop - Cross-platform COM interop library for .NET Core 2.1 or newer

node-foundationdb - Modern Node.js FoundationDB bindings

create-rust-app - Set up a modern rust+react web app by running one command.

manifold - Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.

EU4ConsolePatcher - A simple memory patcher which enables the internal developer console in ironman mode

watt - Runtime for executing procedural macros as WebAssembly