#reflection #introspection #run-time #facet #manipulation #run-time-reflection

no-std facet-reflect

Build and manipulate values of arbitrary Facet types at runtime while respecting invariants - safe runtime reflection

70 releases (26 breaking)

Uses new Rust 2024

new 0.42.0 Jan 6, 2026
0.41.0 Dec 31, 2025
0.40.0 Dec 29, 2025
0.31.8 Nov 27, 2025
0.28.0 Jul 24, 2025

#196 in Development tools

Download history 1362/week @ 2025-09-16 945/week @ 2025-09-23 1150/week @ 2025-09-30 1664/week @ 2025-10-07 1348/week @ 2025-10-14 726/week @ 2025-10-21 847/week @ 2025-10-28 722/week @ 2025-11-04 712/week @ 2025-11-11 825/week @ 2025-11-18 641/week @ 2025-11-25 832/week @ 2025-12-02 1329/week @ 2025-12-09 1351/week @ 2025-12-16 1095/week @ 2025-12-23 2373/week @ 2025-12-30

6,357 downloads per month
Used in 109 crates (45 directly)

MIT/Apache

1MB
23K SLoC

facet-reflect

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

Whereas the core facet crate provides essential traits like Facet itself, and data structures like Type, StructType, Field, etc., facet-reflect uses that information about the shape of types to allow:

  • Read-only access to already-initialized values (via Peek)
  • Construction of values from scratch (via Partial)

This allows, respectively, serialization and deserialization, without risking breaking invariants in types that implement Facet.

LLM contribution policy

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors 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.

Dependencies

~0–14MB
~138K SLoC