# facet-rs/facet

Rust reflection, serialization, deserialization, pretty printing, etc. — the last proc macro you should need

Repository: https://github.com/facet-rs/facet
Canonical: https://ross.abutalabs.com/products/facet
Homepage: https://facet.rs
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: deserialization, rust, rust-lang, serialization, debugging, introspection, reflection
Last push: 2026-08-26T13:17:03+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 38
- inputs: {"age_days": 541, "days_push": 7, "days_rel": 13, "gap_med": 0.0, "n_releases_24m": 1845}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2570, forks 128 (observed 2026-08-28T04:07:01.377802+00:00)

## What it is
Facet is a Rust reflection ecosystem: a single derive macro gives types a runtime SHAPE description (fields, variants, attributes, layout) that other crates consume. On top of that core it provides serialization/deserialization for JSON, TOML, YAML, MessagePack, CSV, XML and more, plus pretty-printing, diffing, and introspection tooling.

## Use cases
- serialize rust structs to json without serde
- reflect on struct fields at runtime in rust
- pretty-print rust values with sensitive field redaction
- generate schemas from rust types
- diff two rust structs structurally
- deserialize config files into typed rust structs
- introspect type metadata via a derive macro

## When to choose
- you want one derive to power serialization, introspection, diffing, and pretty-printing instead of separate serde/other derives
- you need runtime access to type structure (fields, attributes, invariants) in Rust
- you want span-aware serialization errors or sensitive-field redaction

## When to avoid
- you need the mature, battle-tested serde ecosystem with maximal format and community support
- your project requires stable 1.0 APIs — facet is still pre-1.0 and evolving
- you only need basic JSON serialization and already use serde

## Facets
- artifact type: library
- maturity: active
- function: serialization, parser, developer-tools, plugin-system
- domain: developer-tools, programming-languages, apis
- platform: rust, cross-platform
- tags: reflection, proc-macro, introspection, type-shape, serde-alternative, pretty-printing, schema-generation, structural-diffing

## Member repositories
- facet-rs/facet (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:01.377802+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-30T02:23:19.388204+00:00, confidence not recorded.
  - readme: https://github.com/facet-rs/facet (fetched 2026-08-28T04:07:01.377802+00:00, sha 8ad27fc897b6)
  - homepage: https://facet.rs (fetched 2026-08-29T10:05:40.040331+00:00, sha ae807d2926ef)
  - registry_crates: https://crates.io/api/v1/crates/facet (fetched 2026-08-29T10:05:40.049226+00:00, sha 63e7d2c9b97b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
