[capnproto] capnp::messageToFlatArray to pre-allocated buffer?

2022-11-05 Thread Hui min
Hi CapnProto Team, I understand the API to obtain a flat buffer of the built message is capnp::messageToFlatArray. However, the current API forces you to save the buffer on a returned kj::Array words object. Is there a way I could pass in a pre-allocated buffer, and let CapnProto to use that f

[capnproto] [Feature Request] Putting List() object at last and allow reuse of the MallocMessageBuilder

2022-11-05 Thread Hui min
Hi Cap'n Proto Team, Thanks for the amazing tool you have created so far. Understand that with the current design of arena style memory allocation, we cannot simply reuse the message, and re-init List() object to send it again. This will cause the message to grow every time we send (memory leak