A .NET source generator for generating high-performance object mappings with no runtime reflection.
Mapperly is a .NET source generator that automatically creates object mapping code at compile time. It solves the problem of inefficient runtime reflection in object mapping libraries by generating performant, readable mapping implementations directly into your project. This approach ensures minimal overhead and full transparency into how mappings are executed.
.NET developers who need to map between objects in their applications, particularly those working on performance-sensitive projects or seeking alternatives to reflection-based mappers.
Developers choose Mapperly for its blend of high performance, generated code readability, and seamless integration into the .NET build process. It provides a modern, reflection-free alternative to traditional mapping libraries.
A .NET source generator for generating object mappings. No runtime reflection.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates mapping code at compile time, eliminating runtime reflection entirely for maximal performance, as highlighted in the key features.
Produces perfectly readable C# code that developers can inspect and debug easily, ensuring transparency in mapping implementations.
Uses partial classes and the [Mapper] attribute, allowing clean integration into existing .NET projects without disruptive changes.
Supports custom mappings and type conversions through its abstraction library, enabling handling of advanced scenarios as noted in the documentation.
Compared to established libraries like AutoMapper, Mapperly has a smaller community and fewer third-party extensions or integrations.
The next channel releases may contain breaking changes and aren't subject to semantic versioning, posing risks for early adopters, as warned in the README.
Source generators can be harder to debug than runtime libraries, as errors occur during compilation rather than execution, requiring familiarity with .NET build tools.
Mapperly is an open-source alternative to the following products: