Tools/riok/mapperly

mapperly

A .NET source generator for generating object mappings. No runtime reflection.

4.2kemergingC#Apache License 2.0trending

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Sep 2026

Mapperly writes your .NET object mapping code at compile time. Moving data from a database entity to an API response object means a pile of tedious property assignments, and AutoMapper handled that for years using runtime reflection. Mapperly does the same job as a Roslyn source generator: declare a partial class with a Mapper attribute and the method signatures, and the implementation lands in your build. Apache 2.0, free, on NuGet.

The wins are speed and debuggability. No reflection at runtime means mapping costs the same as hand-written assignments, and the generated code is plain C# you can step through and read in a diff. Mistakes become compile errors instead of production exceptions. AutoMapper's newer versions moved to commercial licensing, which sent a lot of .NET teams looking for exactly this.

One package reference. Nothing to host, nothing to configure at runtime, no ops burden at any team size.

The catch is that compile-time generation costs you runtime flexibility. Mapping shapes you only learn from data at request time is not what this is for, and complex custom conversions take more attribute wiring than the equivalent AutoMapper profile. You trade flexibility for a build that fails loudly instead of a request that fails quietly.

Free vs Self-Hosted vs Paid

fully free

Free tier: All of it. Apache 2.0 on NuGet with no paid edition and no gated attributes. Every mapping feature, analyzer, and diagnostic is in the free package.

Self-hosted: Not applicable. Mapperly is a build-time NuGet package, so it runs inside your existing compile step. There is no runtime dependency shipped to production, which also means no extra assembly to patch when a CVE lands.

Paid: No tiers. The maintainers at riok offer optional GitHub Sponsors for priority support, and sell separate consulting for enterprise support, architecture review, and custom development through direct contact. That is services revenue, not a locked feature.

Free and complete. You would only pay for a human, never for a feature.

What to do by team size

Solo
free
Small team
free
Medium team
free
Large team
free; sponsor if you need priority support
Self-hosting ops:trivial

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Score
62/100 · B
Adoption16/30
Maintenance10/25
Community11/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

Trust Signals

Community discussions enabledOrganization account (5 public repos)Author also built: riok/Kreya (345 stars)

License: Apache License 2.0

Use freely. Patent grant included.

Commercial use: ✓ Yes

About

Owner
riok (Organization)
Stars
4,160

Also by riok

Explore Further

More tools in the directory