#Memory-Map (&mut u8) to GRPC (Vecu8)

1 messages · Page 1 of 1 (latest)

royal lodge
#

Memory-Map (&mut u8) to GRPC (Vecu8)

#

I'm using grpc to stream data from a large memory mapped file. The generated grpc code takes a Vec<u8> to build a response object while the memory map is exposed as &mut [u8]. Currently I'm just cloning from the memory mapped data as needed but I'm wondering if there's a more performant way of approaching this?

I assume I would have to write my own protocol or use something other than grpc.

winter wraith
royal lodge
#

Using prost 0.11 (and tonic 0.8 for grpc server implementation)