You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cap'n Proto
Hello!
I'm attempting to use Cap'n proto for a Rust project which requires sending DAG subgraphs via network packets.
I didn't see anything on this topic in the docs or examples. I am curious whether there exists a best practice, or perhaps some examples of others using Cap'n proto for this purpose.
Perhaps I am missing something, but as far as I can tell, I'd need to implement this as an overlay using offsets managed outside of Cap'n proto. Is this a
correct understanding?
Cheers, Daniel-
Ian Denhardt
unread,
Feb 17, 2020, 4:57:38 PM2/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cap'n Proto, Daniel Norman
Yes, the capnproto spec officially forbids sharing inside a message
Different implementations may have varying levels of tolerance for
this, but it's probably best not to bend the spec here.
Have a look at schema.capnp, in particular the way the `Node` type is
managed by id, for some inspiration.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cap'n Proto
I see. I don't see where the spec explicitly forbids shared pointers, but the encoding section talks about the traversal limit in case of cyclic pointers, which makes sense to guard against attacks.
The lack of ability to express them in the schema guards against the creation of footguns I guess.
I'll move forward with manual indexing into a list of nodes. It's probably about the same in terms of efficiency anyway.
Just good to know I'm not going against the grain.