6 ms·
Extend Protobuf/FlatBuffers Schema IDL with Shared/Circular Reference Support
- chaokunyang 6mo agoIf you already have .proto or .fbs schemas and you want shared/circular reference support, with the Fory compiler you can keep those schemas, add a small set of Fory options, then foryc generates idiomatic native models across Fory-supported languages With fory first-class object graph serialziation support, you can serialize object graphs without manual *_id link reconstruction or rewriting your entire schema into Fory Schema. 1. GitHub: https://github.com/apache/fory https://github.com/apache/fory 2. Compiler docs: https://fory.apache.org/docs/compiler https://fory.apache.org/docs/compiler
- chaokunyang 6mo agoProtobuf Example: syntax = "proto3"; message TreeNode { TreeNode parent = 1 [(fory).weak_ref = true]; repeated TreeNode children = 2 [(fory).ref = true]; }
- chaokunyang 6mo agoFlatbuffer Example: namespace demo; table Node { parent: Node (fory_weak_ref: true); children: [Node] (fory_ref: true); cached: Node (fory_ref: true, fory_thread_safe_pointer: false); }