49 releases (20 breaking)

Uses new Rust 2024

new 0.27.13 Jun 15, 2025
0.27.8 May 31, 2025

#2683 in Rust patterns

Download history 667/week @ 2025-04-06 1168/week @ 2025-04-13 1575/week @ 2025-04-20 716/week @ 2025-04-27 856/week @ 2025-05-04 1291/week @ 2025-05-11 815/week @ 2025-05-18 827/week @ 2025-05-25 1135/week @ 2025-06-01 396/week @ 2025-06-08

3,354 downloads per month
Used in 28 crates (21 directly)

MIT/Apache

495KB
10K SLoC

Facet logo - a reflection library for Rust

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

Logo by Misiasart

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Ko-fi GitHub Sponsors Patreon Zed Depot

Defines the core types and traits used throughout the facet ecosystem for runtime reflection:

  • Facet: exposes a SHAPE associated const
  • Shape: The central type that describes the memory layout and capabilities of a type
  • Various vtables that define how to manipulate types at runtime
  • The Def tree, which describes type definitions (structs, enums, etc.)

This crate is foundational to facet's reflection capabilities, providing the type system that enables runtime type manipulation.

License

Licensed under either of:

at your option.

Dependencies

~0.1–2.6MB
~41K SLoC