Introduce capnp::clone(reader) which makes an owned copy of any capnp object.
This is frequently needed. Sandstorm had `OwnCapnp` for this purpose: https://github.com/sandstorm-io/sandstorm/blob/4d86a8144cdb43120ea12845738d0fe4a6ffcda1/src/sandstorm/util.h#L495-L525 The Workers codebase has some ad-hoc copies of this logic too, and multiple people have requested something similar on the mailing list.
Showing
Please
register
or
sign in
to comment