MCPcopy Index your code
hub / github.com/facet-rs/facet

github.com/facet-rs/facet @ur-taking-me-with-you-v8.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release ur-taking-me-with-you-v8.0.1 ↗ · + Follow
26,106 symbols 94,786 edges 1,375 files 5,649 documented · 22% updated 3d agosnark-v0.0.1 · 2026-06-28★ 2,544132 open issues

Browse by type

Functions 19,978 Types & classes 6,128
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

facet-core

Coverage Status crates.io documentation MIT/Apache-2.0 licensed Discord

facet provides reflection for Rust: it gives types a SHAPE associated const with details on the layout, fields, doc comments, attributes, etc.

It can be used for many things, from (de)serialization to pretty-printing, rich debuggers, CLI parsing, reflection in templating engines, code generation, etc.

See https://facet.rs for details.

Workspace contents

The main facet crate re-exports symbols from:

  • facet-core, which defines the main components:
  • The [Facet] trait and implementations for foreign types (mostly libstd)
  • The [Shape] struct along with various vtables and the whole [Def] tree
  • Type-erased pointer helpers like [PtrUninit], [PtrConst], and [Opaque]
  • Autoderef specialization trick needed for facet-macros
  • facet-macros, which implements the [Facet] derive attribute as a fast/light proc macro powered by unsynn

For struct manipulation and reflection, we have:

  • facet-reflect, allows building values of arbitrary shapes in safe code, respecting invariants. It also allows peeking at existing values.

Internal crates include:

  • facet-testhelpers a simple log logger and color-backtrace configured with the lightweight btparse backend

Ecosystem

Various crates live under the https://github.com/facet-rs umbrella, and their repositories are kept somewhat-consistent through facet-dev.

Crates are in various states of progress, buyer beware!

In terms of data formats, we have:

Still adjacent to serialization/deserialization, we have:

  • facet-urlencoded: URL-encoded form data deserialization
  • figue: CLI arguments, config files, and environment variables (external crate)

As far as utilities go:

And the less developed:

  • facet-inspect: Utilities to inspect the content of a Facet object

Previously separate crates

These crates previously lived in separate repositories and now live in this monorepo:

  • facet-xml: XML/DOM ecosystem (includes facet-xml, facet-dom, facet-svg, facet-atom, facet-xml-node, facet-singularize)
  • facet-axum: Axum web framework integration

Extended cinematic universe

Some crates are developed completely independently from the facet org:

  • facet-v8 provides an experimental Facet/v8 integration
  • facet-openapi (experimental) Generates OpenAPI definitions from types that implement Facet
  • facet_generate reflects Facet types into Java, Swift and TypeScript
  • multi-array-list provides an experimental MultiArrayList type

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors

<img src="https://github.com/facet-rs/facet/raw/main/static/sponsors-v3/patreon-light.svg" height="40" alt="Patreon">

...along with corporate sponsors:

AWS

Zed

Depot

...without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 11,540
Method 8,438
Class 4,558
Enum 1,207
Interface 345
Struct 14
TypeAlias 4

Languages

Rust89%
TypeScript9%
C1%
Python1%
Go1%
Kotlin1%

Modules by API surface

vox/typescript/subject/subject.ts415 symbols
vox/spec/spec-tests/tests/cases/testbed.rs367 symbols
vox/spec/spec-proto/src/lib.rs345 symbols
phon/rust/phon/tests/ecosystem_surface.rs336 symbols
vox/spec/spec-tests/src/harness.rs330 symbols
vox/rust/subject-rust/src/lib.rs310 symbols
phon/rust/phon/examples/ecosystem_surface_bench.rs281 symbols
styx-docs/static/codemirror-styx/index.js247 symbols
vox/spec/spec-tests/tests/spec_matrix.rs242 symbols
phon/rust/phon/src/derive.rs239 symbols
facet-format-suite/src/lib.rs234 symbols
figue/src/layers/cli.rs211 symbols

Datastores touched

dbDatabase · 1 repos
appDatabase · 1 repos
dibs_fixtureDatabase · 1 repos
mydbDatabase · 1 repos
myappDatabase · 1 repos
(mysql)Database · 1 repos
dibs_testDatabase · 1 repos
figueDatabase · 1 repos

For agents

$ claude mcp add facet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page