Ecosystem

One #[derive(Facet)] describes your type once. Everything below reads that description to do something useful — serialize it, diff it, generate a schema, build a CLI, pretty-print it. You almost never depend on these crates directly: you derive Facet, add the crate that does the job, and call it.

This page is the map. Crate names link to docs.rs; the Source column points at the repository.

Looking for which standard/third-party Rust types already implement Facet (Uuid, DateTime, Utf8PathBuf, …)? That's the Type Support page.

Core & reflection

The foundation. facet is the one crate every user depends on; the rest is the machinery it re-exports.

CrateWhat it doesSource
facetThe umbrella crate — #[derive(Facet)] and the Facet trait. Start here.facet-rs/facet
facet-coreShape metadata, the Def tree, type-erased pointers. The vocabulary everything else speaks.facet-rs/facet
facet-reflectBuild and read values of arbitrary shapes at runtime, safely — Peek and Partial.facet-rs/facet
facet-macrosThe derive macro itself, powered by unsynn for fast compiles.facet-rs/facet

Data formats

Serialize and deserialize derived types. Same type, any format — pick the crate, call to_string / from_str.

CrateWhat it doesSource
facet-jsonJSON, with a tiered JIT deserializer. The flagship — start here.facet-rs/facet-format
facet-tomlTOML serialization and deserialization.facet-rs/facet-format
facet-yamlYAML serialization and deserialization.facet-rs/facet-format
facet-msgpackMessagePack binary format.facet-rs/facet-format
facet-postcardPostcard binary format, with tiered JIT deserialization.facet-rs/facet-format
facet-csvCSV serialization.facet-rs/facet-format
facet-asn1ASN.1 DER/BER serialization and deserialization.facet-rs/facet-format
facet-xdrXDR binary format serialization.facet-rs/facet-format
facet-urlencodedapplication/x-www-form-urlencoded form data.facet-rs/facet

The XML family

XML uses a tree (DOM) architecture rather than streaming, so it lives in its own workspace alongside formats built on top of it.

CrateWhat it doesSource
facet-xmlXML serialization and deserialization.facet-rs/facet-xml
facet-domTree-based (DOM) deserializer shared by HTML and XML.facet-rs/facet-xml
facet-svgStrongly-typed SVG documents on top of facet-xml.facet-rs/facet-xml
facet-atomAtom Syndication Format (RFC 4287) types.facet-rs/facet-xml

Schema & code generation

Project your Rust types into other type systems — keep a frontend, an API contract, or another language in sync from one source of truth.

CrateWhat it doesSource
facet-typescriptGenerate TypeScript type definitions.facet-rs/facet-format
facet-zodGenerate Zod schemas (runtime validation + inferred TS types). Unreleased — landing on crates.io soon.facet-rs/facet
facet-json-schemaGenerate JSON Schema documents.facet-rs/facet-format
facet-pythonGenerate Python type definitions.facet-rs/facet-format

See the Schema codegen guide for a full-stack workflow.

Diagnostics & derive plugins

Day-to-day ergonomics: better output, better errors, less boilerplate.

CrateWhat it doesSource
facet-prettyColored, structured pretty-printing with sensitive-field redaction. Guide.facet-rs/facet
rediffStructural diff and pretty assertions for any Facet type — no PartialEq required.bearcove/rediff
facet-defaultDerive Default with per-field custom defaults. Guide.facet-rs/facet
facet-errorA thiserror replacement — derive Error from doc comments. Guide.facet-rs/facet
facet-validateValidation attributes checked during deserialization. Guide.facet-rs/facet

Configuration & CLI

CrateWhat it doesSource
figueType-safe CLI args, environment variables, and config files in one layered model. Guide.bearcove/figue
facet-cargo-tomlA fully-typed Cargo.toml / Cargo.lock parser.bearcove/facet-cargo-toml

Web & UI

CrateWhat it doesSource
facet-axumaxum extractors and responses backed by facet instead of serde.facet-rs/facet-axum
facet-eguiAn egui inspector/editor widget for any Facet type — live, type-driven UI straight from a Shape. Community-maintained.Erik1000/facet-egui

Building blocks

Lower-level pieces you'll meet when writing your own format crate or tooling.

CrateWhat it doesSource
facet-valueA memory-efficient dynamic value type — JSON-like data plus bytes.facet-rs/facet-format
facet-solverConstraint solver that resolves type shapes from field names.facet-rs/facet
facet-pathPath tracking for navigating nested Facet structures.facet-rs/facet

Writing a new format crate? The Extend section walks through Peek, Partial, and the format-crate architecture.


Building something facet-adjacent? Open a PR against the website and we'll add it to the map.