diff --git a/src/ppx/ppx_deriving_binary.ml b/src/ppx/ppx_deriving_binary.ml index b4441b4..9b2a830 100644 --- a/src/ppx/ppx_deriving_binary.ml +++ b/src/ppx/ppx_deriving_binary.ml @@ -39,3 +39,14 @@ let () = ~type_decl_str:(Encoder.type_decl_str ~deriver) ~type_decl_sig:Encoder.type_decl_sig ()) + +let () = + let deriver = "binary_bytes" in + register (create "binary_bytes" + ~type_decl_str:(fun ~options ~path type_decls -> + Encoder.type_decl_str ~deriver ~options ~path type_decls + @ Decoder.type_decl_str ~deriver ~options ~path type_decls) + ~type_decl_sig:(fun ~options ~path type_decls -> + Encoder.type_decl_sig ~options ~path type_decls + @ Decoder.type_decl_sig ~options ~path type_decls) + ())