Support Facet in the BSON crate

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Rust Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • 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.

            Assignee:
            Abraham Egnor
            Reporter:
            Abraham Egnor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: