Thank you for your comments, it helped me in the development of camlid. An example of the pattern we talk about can be found there.
For enum I have not yet added the helper, but the correspondance C/OCaml would be handled in C with a simple generated switch. For flags, it is also not yet implemented but an unboxed, untagged and noalloc external function lab1:bool -> lab2:bool -> lab3:bool -> lab4:bool -> Int32.t wrapped into a function ?lab1:bool -> ?lab2:bool -> ?lab3:bool -> ?lab4:bool -> unit -> Int32.t seems good enough.