12 unstable releases (3 breaking)

Uses new Rust 2024

new 0.5.3 Apr 12, 2025
0.5.2 Apr 12, 2025
0.4.2 Apr 11, 2025
0.3.3 Apr 10, 2025
0.2.5 Apr 10, 2025

#2742 in Rust patterns

Download history 1315/week @ 2025-04-07

1,315 downloads per month
Used in 15 crates (14 directly)

MIT/Apache

300KB
6K SLoC

Facet logo - a reflection library for Rust   facet-core

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

Logo by Misiasart

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

Ko-fi GitHub Sponsors Patreon Zed built with 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.

Dependencies

~150KB