# Cysharp/MemoryPack

Zero encoding extreme performance binary serializer for C# and Unity.

Repository: https://github.com/Cysharp/MemoryPack
Canonical: https://ross.abutalabs.com/products/memorypack
Language: C#
License: MIT
License Family: permissive
Last push: 2026-07-08T03:22:18+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 28, longevity 100
- inputs: {"age_days": 1460, "days_push": 56, "days_rel": 567, "gap_med": 73.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4708, forks 312 (observed 2026-08-28T04:08:57.343981+00:00)

## What it is
MemoryPack is a zero-encoding, extremely fast binary serializer for C# and Unity, using a C#-optimized format that copies memory directly instead of encoding. It supports source-generator-based codegen, version tolerance, polymorphism, circular references, and TypeScript code generation.

## Use cases
- serialize C# objects to binary faster than MessagePack or protobuf
- high-performance serialization for Unity IL2CPP games
- serialize struct arrays with minimal overhead
- AOT-friendly serialization without reflection or IL emit
- version-tolerant binary serialization of POCOs
- generate TypeScript definitions from C# types
- streaming serialization with PipeWriter/PipeReader

## When to choose
- you need maximum serialization throughput in .NET or Unity
- you want Native AOT / IL2CPP compatible serialization via source generators
- you serialize large arrays of structs
- you want a C#-specific binary format without schema encoding overhead

## When to avoid
- you need cross-language interoperability with a standard format like JSON, Protobuf, or MessagePack
- you need full schema evolution across many versions
- your target is below .NET Standard 2.1
- you need human-readable serialization

## Facets
- artifact type: library
- maturity: active
- function: serialization
- domain: developer-tools, backend
- platform: cross-platform, game-engine, dotnet
- tags: binary-serializer, unity, source-generator, zero-encoding, poco, aot-friendly, game-development, c#

## Member repositories
- Cysharp/MemoryPack (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.343981+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:09.806499+00:00, confidence not recorded.
  - readme: https://github.com/Cysharp/MemoryPack (fetched 2026-08-28T04:08:57.343981+00:00, sha 0de65b1fa81a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
