I’ve been pretty interested in Capnproto (capnp) recently and have wanted to build a web app with it for fun. Capnp is a data interchange solution very much akin to ProtoBufs. It uses a schema in a custom language which is used to compile a library in a target language that handles the data. I was thinking of implementing the capnp-elm compiler plugin to allow the capnp compiler to target Elm.
Capnp was designed to be incredibly fast by having an in memory representation that matches the over the wire one. Additionally, the spec requires the use of arena allocation where we manually allocate a large chunk of memory in which we produce and maintain our protos. I believe this arena allocation would only be possible in pure Elm if we had access to a presized byte array that we could allocate. When reading through elm/bytes, I was directed to this forum.
Let me know if this scenario accurately fits the concerns listed in elm bytes. I’m also somewhat curious if any are interested in the use of Capnp in Elm, but that’s a bit secondary to this question. Thanks in advance for any feedback you may provide.