What problem does it solve?
Facet provides a reflection-based alternative to serde for Rust. Instead of Serialize/Deserialize traits, types derive Facet which exposes a SHAPE associated constant with full type introspection, enabling serialization, CLI parsing, and crate mappings without the boilerplate of serde.
Core Features & Use Cases
- Derive Macro: Derive Facet to enable runtime type introspection and generic tooling without serde derives.
- Crate Mappings & Patterns: Provides crate mappings (serde_json → facet-json, clap → facet-args, etc.) and practical usage patterns for common formats and CLI parsing.
- Use Case: Rapidly explore and serialize complex Rust types with minimal boilerplate, improving tooling and interoperability.
Quick Start
Use the facet derive on a struct to enable runtime shape introspection and JSON encoding with facet-json.