As far as I can tell, Lwt_bytes seems to use the same type as Cstruct (or probably uses cstruct itself), but some some reason I can't make the two of them work together :
Lwt_io.write_from_exactly out b.Cstruct.buffer 0 16
Error: This expression has type
Cstruct.buffer =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout)
Bigarray.Array1.t
but an expression was expected of type bytes
Isn't bytes that exact same type ? How can I make that work ? I'm trying to use Cstruct instead of Lwt_bytes for the convenience of Cstruct.LE, which bytes doesn't seem to have. Thanks