# Cysharp/MasterMemory

Source Generator based Embedded Typed Readonly In-Memory Document Database for .NET and Unity.

Repository: https://github.com/Cysharp/MasterMemory
Canonical: https://ross.abutalabs.com/products/mastermemory
Language: C#
License: MIT
License Family: permissive
Topics: unity, memory-database, c-sharp
Last push: 2026-07-08T03:22:12+00:00

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

## Adoption (not part of the score)
Stars 1829, forks 124 (observed 2026-08-28T04:05:41.651873+00:00)

## What it is
MasterMemory is a source-generator-based embedded typed readonly in-memory document database for .NET and Unity. It generates type-safe database structures from C# classes, offering extremely fast, allocation-free queries for write-once, read-heavy master data.

## Use cases
- store game master data like item and character tables in Unity
- embed a fast read-only database in a .NET application
- replace SQLite for read-heavy lookup workloads
- run type-safe range and closest-match queries on in-memory data
- load large reference datasets quickly with MessagePack serialization
- validate master data with custom C# validators

## When to choose
- your data is write-once and read-heavy
- you need zero-allocation, dictionary-speed lookups in .NET or Unity
- you want compile-time type safety and autocompletion for queries
- database size and load speed matter, such as in games or embedded apps

## When to avoid
- you need to write or update data at runtime
- you require SQL queries or ad-hoc querying
- your dataset must be shared across processes or accessed over a network
- you need a full relational database with transactions

## Facets
- artifact type: library
- maturity: active
- function: database, serialization, search-engine
- domain: databases, developer-tools
- platform: cross-platform, game-engine, dotnet
- tags: in-memory-database, source-generator, embedded-database, readonly-database, messagepack, unity, game-development

## Member repositories
- Cysharp/MasterMemory (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:41.651873+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-30T03:19:21.211470+00:00, confidence not recorded.
  - readme: https://github.com/Cysharp/MasterMemory (fetched 2026-08-28T04:05:41.651873+00:00, sha 311e1a74802c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
