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.
| Crate | What it does | Source |
|---|---|---|
facet | The umbrella crate — #[derive(Facet)] and the Facet trait. Start here. | facet-rs/facet |
facet-core | Shape metadata, the Def tree, type-erased pointers. The vocabulary everything else speaks. | facet-rs/facet |
facet-reflect | Build and read values of arbitrary shapes at runtime, safely — Peek and Partial. | facet-rs/facet |
facet-macros | The 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.
| Crate | What it does | Source |
|---|---|---|
facet-json | JSON, with a tiered JIT deserializer. The flagship — start here. | facet-rs/facet-format |
facet-toml | TOML serialization and deserialization. | facet-rs/facet-format |
facet-yaml | YAML serialization and deserialization. | facet-rs/facet-format |
facet-msgpack | MessagePack binary format. | facet-rs/facet-format |
facet-postcard | Postcard binary format, with tiered JIT deserialization. | facet-rs/facet-format |
facet-csv | CSV serialization. | facet-rs/facet-format |
facet-asn1 | ASN.1 DER/BER serialization and deserialization. | facet-rs/facet-format |
facet-xdr | XDR binary format serialization. | facet-rs/facet-format |
facet-urlencoded | application/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.
| Crate | What it does | Source |
|---|---|---|
facet-xml | XML serialization and deserialization. | facet-rs/facet-xml |
facet-dom | Tree-based (DOM) deserializer shared by HTML and XML. | facet-rs/facet-xml |
facet-svg | Strongly-typed SVG documents on top of facet-xml. | facet-rs/facet-xml |
facet-atom | Atom 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.
| Crate | What it does | Source |
|---|---|---|
facet-typescript | Generate TypeScript type definitions. | facet-rs/facet-format |
facet-zod | Generate Zod schemas (runtime validation + inferred TS types). Unreleased — landing on crates.io soon. | facet-rs/facet |
facet-json-schema | Generate JSON Schema documents. | facet-rs/facet-format |
facet-python | Generate 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.
| Crate | What it does | Source |
|---|---|---|
facet-pretty | Colored, structured pretty-printing with sensitive-field redaction. Guide. | facet-rs/facet |
rediff | Structural diff and pretty assertions for any Facet type — no PartialEq required. | bearcove/rediff |
facet-default | Derive Default with per-field custom defaults. Guide. | facet-rs/facet |
facet-error | A thiserror replacement — derive Error from doc comments. Guide. | facet-rs/facet |
facet-validate | Validation attributes checked during deserialization. Guide. | facet-rs/facet |
Configuration & CLI
| Crate | What it does | Source |
|---|---|---|
figue | Type-safe CLI args, environment variables, and config files in one layered model. Guide. | bearcove/figue |
facet-cargo-toml | A fully-typed Cargo.toml / Cargo.lock parser. | bearcove/facet-cargo-toml |
Web & UI
| Crate | What it does | Source |
|---|---|---|
facet-axum | axum extractors and responses backed by facet instead of serde. | facet-rs/facet-axum |
facet-egui | An 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.
| Crate | What it does | Source |
|---|---|---|
facet-value | A memory-efficient dynamic value type — JSON-like data plus bytes. | facet-rs/facet-format |
facet-solver | Constraint solver that resolves type shapes from field names. | facet-rs/facet |
facet-path | Path 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.