fury icon indicating copy to clipboard operation
fury copied to clipboard

[Rust] support circular reference xlang serialization

Open chaokunyang opened this issue 2 months ago • 0 comments

Feature Request

In https://github.com/apache/fory/pull/2714, we supported circular reference serialization for rust, but we don't support it for xlang.

The xlang support for circular reference is not supported in that PR. Circular reference serialized by rust can only be deserialized by rust currently. Xlang support needs extra work to skip extra written meta.

Is your feature request related to a problem? Please describe

circular reference xlang serialization should be supported for rust, it's supported between java/go/python xlang already.

Describe the solution you'd like

Currently when serialize RcWeak/ArcWeak, we always serialize its type meta. But if the wrapped type is morphic, when serialize as a field, we should not write that meta.

And when being element of Vec, that meta should be written by Vec. When being K/V items for HashMap, that meta should be written by HashMap chunk protocol.

Describe alternatives you've considered

No response

Additional context

https://github.com/apache/fory/pull/2714

chaokunyang avatar Oct 08 '25 09:10 chaokunyang