#reflection #facet #type

no-std facet-types

Core types and traits for the facet reflection library

8 releases

Uses new Rust 2024

0.2.4 Apr 10, 2025
0.2.3 Apr 10, 2025
0.1.2 Apr 8, 2025

#2689 in Rust patterns

Download history 172/week @ 2025-04-02 624/week @ 2025-04-09

796 downloads per month
Used in 2 crates

MIT/Apache

75KB
1.5K SLoC

Facet logo - a reflection library for Rust   facet-types

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

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

Ko-fi GitHub Sponsors Patreon Zed

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

  • 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 safe runtime type manipulation.

Key Components

  • Memory layout information (size, alignment, etc.)
  • Type definition hierarchies
  • Runtime type manipulation vtables
  • Safe type erasure primitives

License

Licensed under either of:

at your option.

Dependencies

~120KB