-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Facet is a relatively new crate that provides a runtime reflection mechanism, which (among other things) allows generic serialization as an alternative to Serde.
It's authored by a fairly prominent rustacean (Amos Wenger/fasterthanlime) and has been gaining momentum, so I think it's a good bet.
We should provide optional support for it in the bson crate, specifically:
- binary BSON as a target format
- Facet trait impls for the relevant types
Notably, because Facet uses reflection rather than code generation, the issues we've had with the intersection of those two features in Serde is likely to not be a problem for Facet, since full type information is available to the format implementation. The tradeoff for this is that Facet performance is lower, so the two are likely to co-exist for the foreseeable future.