Skip to content

Releases: apache/fory

v0.16.0

17 Mar 04:14

Choose a tag to compare

Highlights

Features

Bug Fix

  • fix(java): Fix EnumSetSerializer for enums with overriding methods by @NotLebedev in #3315
  • fix(java): Deserialize nested HashMap subclasses by @mandrean in #3342
  • fix(java): support TreeSet/TreeMap subclasses without Comparator constructor in SortedSet/SortedMapSerializer by @mandrean in #3344
  • fix(c++): fix buffer read/write bound check by @chaokunyang in #3418
  • fix: avoid NoClassDefFoundError in supportCodegenForJavaSerialization by @siy in #3424
  • fix(docs): updated the compiler guide by @ayush00git in #3420
  • fix(python): return UTC-aware datetime instead of naive datetime by @yuta4895 in #3439
  • fix(docs): adjusted sidebar position and fixed typos by @ayush00git in #3450
  • fix(python): support tuple dataclass fields and object instances by @chaokunyang in #3468
  • fix(python): fix python wheel build by @chaokunyang in #3469
  • fix(java): avoid deflater meta decompression hang on invalid input by @chaokunyang in #3472

Other Improvements

Read more

v0.15.0

09 Feb 13:43

Choose a tag to compare

Highlights

  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
    feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment by @chaokunyang in #3107
  • feat(c++): add SharedWeak for circular reference support by @chaokunyang in #3109
  • feat(xlang): support unsigned int for xlang by @chaokunyang in #3111 and #3113
  • feat(xlang/java): refactor java native serialization type system and streaming type info for xlang by @chaokunyang in #3153
  • feat(xlang): fory schema idl and compiler by @chaokunyang in #3106
  • feat(compiler): add flatbuffers idl support by @chaokunyang in #3184
  • feat(compiler): support shared/circular reference serialization for fory/protobuf/flatbuffer idl by @chaokunyang in #3226

Go Serialization: First Release

Apache Fory 0.15.0 is the first release with official Go serialization support.
The Go implementation delivers high-performance serialization with cross-language
compatibility and production-focused configuration options.

Key capabilities:

  • Cross-language mode with Java, Python, cpp, Rust, and JavaScript (fory.WithXlang(true))
  • Reflection-based serialization by default, plus optional experimental AOT code generation for hot paths
  • Reference tracking for shared/circular object graphs (fory.WithTrackRef(true) + fory:"ref" tags)
  • Compatible mode for schema evolution (fory.WithCompatible(true)) supporting add/remove/reorder field changes
  • Thread-safe wrapper (github.com/apache/fory/go/fory/threadsafe) for concurrent workloads

Quick Start

package main

import (
    "github.com/apache/fory/go/fory"
)

type User struct {
    ID   int64
    Name string
}

func main() {
    f := fory.New(
        fory.WithXlang(true),
        fory.WithCompatible(true),
    )
    _ = f.RegisterStruct(User{}, 1)

    data, _ := f.Serialize(&User{ID: 1, Name: "Alice"})
    var out User
    _ = f.Deserialize(data, &out)
}

Go Benchmarks

Below are timing results (ns/op; lower is better) comparing Fory with Protobuf and Msgpack across representative data structures.

Data Type Operation Fory Protobuf Msgpack
Struct Serialize 66.0 97.8 184.9
Struct Deserialize 82.7 90.9 309.6
Structlist Serialize 632.8 1783.0 3340.0
Structlist Deserialize 906.4 1891.0 5709.0
Sample Serialize 137.3 367.3 1492.0
Sample Deserialize 263.6 422.2 2661.0
Samplelist Serialize 1962.0 7087.0 26169.0
Samplelist Deserialize 4234.0 9321.0 53615.0
Mediacontent Serialize 268.8 471.1 773.7
Mediacontent Deserialize 426.9 553.1 1432.0
Mediacontentlist Serialize 3736.0 9107.0 13911.0
Mediacontentlist Deserialize 7247.0 11435.0 27975.0

Serialized data sizes (bytes):

Data Type Fory Protobuf Msgpack
Struct 58 61 57
Sample 446 375 524
MediaContent 342 301 400
StructList 560 1260 1146
SampleList 7600 7560 10486
MediaContentList 5776 6080 8006

Note: Results depend on hardware and implementation versions. See the Go benchmark docs for details: https://fory.apache.org/docs/benchmarks/go/

Fory Schema IDL and Compiler: First Release

Apache Fory 0.15.0 also introduces the first release of the Fory schema IDL and
compiler toolchain. You can define schemas once and generate native types and
registration code across languages.

Key capabilities:

  • Schema-first development with enum, message, and union
  • Fory-native field semantics: optional (nullability), ref (shared/circular references), list, and map
  • Multi-language code generation for Java, Python, Go, Rust, and cpp
  • Protobuf (.proto) and FlatBuffers (.fbs) frontend support, translated into Fory IR/codegen
  • Idiomatic generated APIs with to/from bytes helpers

Quick Start

pip install fory-compiler
foryc example.fdl --lang java,python,go,rust,cpp --output ./generated
package example;

message Person [id=101] {
    string name = 1;
    optional string email = 2;
}

Generated Code Example

foryc generates idiomatic native types plus registration/byte helpers. For the
schema above, generated code looks like:

// Go (excerpt)
type Person struct {
    Name  string                    `fory:"id=1"`
    Email optional.Optional[string] `fory:"id=2"`
}

func (m *Person) ToBytes() ([]byte, error)      { ... }
func (m *Person) FromBytes(data []byte) error   { ... }
func RegisterTypes(f *fory.Fory) error {
    return f.RegisterStruct(Person{}, 101)
}
// Java (excerpt)
public class Person {
    @ForyField(id = 1)
    private String name;

    @ForyField(id = 2, nullable = true)
    private String email;

    public byte[] toBytes() { ... }
    public static Person fromBytes(byte[] bytes) { ... }
}
# Python (excerpt)
@pyfory.dataclass
class Person:
    name: str = pyfory.field(id=1, default="")
    email: Optional[str] = pyfory.field(id=2, default=None)

    def to_bytes(self) -> bytes: ...
    @classmethod
    def from_bytes(cls, data: bytes) -> "Person": ...

Features

  • feat(java): add config params for IdentityObjectIntMap by @jim-parsons in #3048
  • perf: add cpp benchmark report by @chaokunyang in #3051
  • feat(python): add Union type support for xlang serialization by @zhan7236 in #3059
  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(java): enhance ForyField annotation with tag ID support for optimized serialization by @mchernyakov in #3021
  • feat(c++): add iterator container serialization support by @zhan7236 in #3068
  • refactor(go): refactor go error processing by @chaokunyang in #3069
  • feat(rust): add generate_default attr, no longer generate Default trait impl by default by @ariesdevil in #3074
  • feat(java): implement Union type support for cross-language serialization by @zhan7236 in #3062
  • perf(go): add go benchmarks and optimize performance by @chaokunyang in #3071
  • feat(python): add java python xlang tests and align protocol by @chaokunyang in #3077
  • feat(rust): add i128 and isize type support by @ariesdevil in #3080
  • feat(rust): add unit type and PhantomData serializer support by @ariesdevil in #3081
  • refactor(python): refactor pyfory serializers code structure by @chaokunyang in #3083
  • feat(rust): add union and none type support by @ariesdevil in #3084
  • feat(go): add go struct field tag support by @chaokunyang in #3082
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • feat(rust): support configure rust field meta to reduce cost by @chaokunyang in #3089
  • feat(c++): support customize c++ field meta by @chaokunyang in #3088
  • feat(ci): make rust xlang ci run separately to make ci faster by @chaokunyang in #3090
  • feat(python): support configure field meta for python by @chaokunyang in #3091
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
  • feat(java): build Descriptors with final ref_tracking flags by @chaokunyang in #3070
  • feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(rust): implement fine-grained ref tracking for rust by @chaokunyang in #3101
  • feat(c++): fine-grained ref tracking for c++ by @chaokunyang in #3103
  • feat(java/python/rust/go/c++): xlang nullable/ref alignment by @chaokunyang in #3104
  • feat(jav...
Read more

v0.15.0-rc3

06 Feb 05:16

Choose a tag to compare

v0.15.0-rc3 Pre-release
Pre-release

Highlights

  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
    feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment by @chaokunyang in #3107
  • feat(c++): add SharedWeak for circular reference support by @chaokunyang in #3109
  • feat(xlang): support unsigned int for xlang by @chaokunyang in #3111 and #3113
  • feat(xlang/java): refactor java native serialization type system and streaming type info for xlang by @chaokunyang in #3153
  • feat(xlang): fory schema idl and compiler by @chaokunyang in #3106
  • feat(compiler): add flatbuffers idl support by @chaokunyang in #3184
  • feat(compiler): support shared/circular reference serialization for fory/protobuf/flatbuffer idl by @chaokunyang in #3226

Features

Read more

v0.15.0-rc2

06 Feb 05:20

Choose a tag to compare

v0.15.0-rc2 Pre-release
Pre-release

Highlights

  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
    feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment by @chaokunyang in #3107
  • feat(c++): add SharedWeak for circular reference support by @chaokunyang in #3109
  • feat(xlang): support unsigned int for xlang by @chaokunyang in #3111 and #3113
  • feat(xlang/java): refactor java native serialization type system and streaming type info for xlang by @chaokunyang in #3153
  • feat(xlang): fory schema idl and compiler by @chaokunyang in #3106
  • feat(compiler): add flatbuffers idl support by @chaokunyang in #3184
  • feat(compiler): support shared/circular reference serialization for fory/protobuf/flatbuffer idl by @chaokunyang in #3226

Features

Read more

v0.15.0-rc1

06 Feb 05:20

Choose a tag to compare

v0.15.0-rc1 Pre-release
Pre-release

Highlights

  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
    feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment by @chaokunyang in #3107
  • feat(c++): add SharedWeak for circular reference support by @chaokunyang in #3109
  • feat(xlang): support unsigned int for xlang by @chaokunyang in #3111 and #3113
  • feat(xlang/java): refactor java native serialization type system and streaming type info for xlang by @chaokunyang in #3153

Features

  • feat(java): add config params for IdentityObjectIntMap by @jim-parsons in #3048
  • perf: add cpp benchmark report by @chaokunyang in #3051
  • feat(python): add Union type support for xlang serialization by @zhan7236 in #3059
  • feat(go): new golang xlang serialization implementation by @chaokunyang in #3063
  • feat(java): enhance ForyField annotation with tag ID support for optimized serialization by @mchernyakov in #3021
  • feat(c++): add iterator container serialization support by @zhan7236 in #3068
  • refactor(go): refactor go error processing by @chaokunyang in #3069
  • feat(rust): add generate_default attr, no longer generate Default trait impl by default by @ariesdevil in #3074
  • feat(java): implement Union type support for cross-language serialization by @zhan7236 in #3062
  • perf(go): add go benchmarks and optimize performance by @chaokunyang in #3071
  • feat(python): add java python xlang tests and align protocol by @chaokunyang in #3077
  • feat(rust): add i128 and isize type support by @ariesdevil in #3080
  • feat(rust): add unit type and PhantomData serializer support by @ariesdevil in #3081
  • refactor(python): refactor pyfory serializers code structure by @chaokunyang in #3083
  • feat(rust): add union and none type support by @ariesdevil in #3084
  • feat(go): add go struct field tag support by @chaokunyang in #3082
  • feat(rust): add tuple struct support and improve generic type handling by @ariesdevil in #3087
  • feat(rust): support configure rust field meta to reduce cost by @chaokunyang in #3089
  • feat(c++): support customize c++ field meta by @chaokunyang in #3088
  • feat(ci): make rust xlang ci run separately to make ci faster by @chaokunyang in #3090
  • feat(python): support configure field meta for python by @chaokunyang in #3091
  • refactor(rust): unify tuple struct and named struct protocol, and make schema evolution happy by @ariesdevil in #3092
  • feat(java): build Descriptors with final ref_tracking flags by @chaokunyang in #3070
  • feat(java/python/rust/go/c++): align nullable meta for xlang struct fields serialization by @chaokunyang in #3093
  • feat(rust): implement fine-grained ref tracking for rust by @chaokunyang in #3101
  • feat(c++): fine-grained ref tracking for c++ by @chaokunyang in #3103
  • feat(java/python/rust/go/c++): xlang nullable/ref alignment by @chaokunyang in #3104
  • feat(java/python/rust/go/c++): xlang fields reference and typeinfo alignment by @chaokunyang in #3107
  • feat(java/python/go/rust): add circular reference xlang tests by @chaokunyang in #3108
  • feat(c++): add SharedWeak for circular reference support by @chaokunyang in #3109
  • feat(js): add schema-based per-field nullable support for xlang by @theharsh999 in #3100
  • feat(xlang): support unsigned int for xlang by @chaokunyang in #3111
  • feat(java): long array serializer support varint encoding by @Pigsy-Monk in #3115
  • feat(xlang): support serialization for unsigned types and field encoding config by @chaokunyang in #3113
  • perf(go): optimize go struct fields serialization perf by @chaokunyang in #3120
  • feat(java): int array serializer support varint encoding by @Pigsy-Monk in #3124
  • feat(java): support xlang serialization for GraalVM native image by @chaokunyang in #3126
  • refactor(go): rename go interface{} to any by @chaokunyang in #3128
  • refactor(xlang): remove magic number from protocol by @chaokunyang in #3137
  • feat(xlang): use little endian when serializing array of multiple byte element size by @chaokunyang in #3140
  • refactor(java/c++): rename morphic to dynamic by @chaokunyang in #3142
  • feat(xlang): add unsigned integer type support for JavaScript by @ayush00git in #3139
  • feat(dart): add unsigned number for dart by @ayush00git in #3144
  • feat(xlang/java): refactor java native serialization type system and streaming type info for xlang by @chaokunyang in #3153

Bug Fix

  • fix(docs): fix graalvm link by @chaokunyang in #3056
  • fix(Rust): prevent obtaining generic type metadata on custom types(struct/enum) by @urlyy in #3057
  • fix(Rust): Move the calculating of TypeMeta::bytes and TypeMeta::hash ahead of serialization by @urlyy in #3060
  • fix(java): Better ergonomics for AllowListChecker by @Asuka-star in #3061
  • fix(rust): output original registered ID in type mismatch error log by @userzhy in #3067
  • fix(java): Fix CopyOnWriteArrayList field serialization by @vybhavjs in #3079
  • fix(go): reference tracking fails when >127 objects serialized by @jonyoder in #3086
  • fix(java): fix abstract enum and abstract array serialization for GraalVM by @chaokunyang in #3095
  • fix(rust): enable Union type cross-language serialization between Rust and Java by @ariesdevil in #3094
  • fix: x86 architecture missing from universal2 macOS wheel by @madhavajay in #3114
  • fix(java): optimize type resolver calls for xlang mode on graalvm by @chaokunyang in #3129
  • fix(java): stop compilation service when shutdowning compile service by @chaokunyang in #3138
  • fix(python): fix collection null elements read/write by @chaokunyang in #3149
  • fix: typo in the xlang_serialization_spec.md by @ayush00git in #3151
  • fix(java): use littlen endian for utf16 string on big endian by @chaokunyang in #3159
  • fix(java): fix openj9 sliced string serde by @chaokunyang in #3160

Other Improvements

Read more

v0.14.1

29 Dec 11:37

Choose a tag to compare

Highlights

  • feat(rust): add generate_default attr, no longer generate Default by default by @ariesdevil in #3074

Features

  • feat(rust): add generate_default attr, no longer generate Default by default by @ariesdevil in #3074
  • feat(java): mark createSerializer as public by @chaokunyang

Bug Fix

  • fix(java): Fix CopyOnWriteArrayList field serialization by @vybhavjs in #3079
  • fix(java): Better ergonomics for AllowListChecker by @Asuka-star in #3061
  • fix(java): fix read class def when writing classdefs by @chaokunyang in 3ad627c9
  • fix(Rust): Move the calculating of TypeMeta::bytes and TypeMeta::hash ahead of serialization by @urlyy in #3060
  • fix(Rust): prevent obtaining generic type metadata on custom types(struct/enum) by @urlyy in #3057

Full Changelog: v0.14.0...v0.14.1

v0.14.1-rc1

26 Dec 07:48

Choose a tag to compare

v0.14.1-rc1 Pre-release
Pre-release

Highlights

  • feat(rust): add generate_default attr, no longer generate Default by default by @ariesdevil in #3074

Features

  • feat(rust): add generate_default attr, no longer generate Default by default by @ariesdevil in #3074
  • feat(java): mark createSerializer as public by @chaokunyang

Bug Fix

  • fix(java): Fix CopyOnWriteArrayList field serialization by @vybhavjs in #3079
  • fix(java): Better ergonomics for AllowListChecker by @Asuka-star in #3061
  • fix(java): fix read class def when writing classdefs by @chaokunyang in 3ad627c9
  • fix(Rust): Move the calculating of TypeMeta::bytes and TypeMeta::hash ahead of serialization by @urlyy in #3060
  • fix(Rust): prevent obtaining generic type metadata on custom types(struct/enum) by @urlyy in #3057

Full Changelog: v0.14.0...v0.14.1-rc1

v0.14.0

15 Dec 14:21

Choose a tag to compare

Highlights

  • Official C++ Support: Introduced the official Apache Fory C++ implementation, featuring a high-performance object graph serialization framework, xlang support, and comprehensive benchmarks.
  • Row Format & Type System: Implemented a new row-oriented format type system across Java, Python, and C++, enabling row-columnar conversions and removing external Arrow dependencies for schema encoding.
  • Performance Enhancements: Significant optimizations across all languages, including thread-local context management in Rust, fast flat-int maps for C++ type dispatch, and optimized buffer read/write operations.
  • Ecosystem Updates: Added support for JDK 25 (Java), Go 1.23, and Bazel 8. Python support has been officially marked as stable with improved build parallelism.
  • Advanced Java Features: Added GraalVM Native Image support via ForyFeature and new optimized serializers for blocking queues and final fields.

Features

Bug Fix

Other Improvements

Read more

v0.14.0-rc1

11 Dec 16:51

Choose a tag to compare

v0.14.0-rc1 Pre-release
Pre-release

Highlights

  • Official C++ Support: Introduced the official Apache Fory C++ implementation, featuring a high-performance object graph serialization framework, xlang support, and comprehensive benchmarks.
  • Row Format & Type System: Implemented a new row-oriented format type system across Java, Python, and C++, enabling row-columnar conversions and removing external Arrow dependencies for schema encoding.
  • Performance Enhancements: Significant optimizations across all languages, including thread-local context management in Rust, fast flat-int maps for C++ type dispatch, and optimized buffer read/write operations.
  • Ecosystem Updates: Added support for JDK 25 (Java), Go 1.23, and Bazel 8. Python support has been officially marked as stable with improved build parallelism.
  • Advanced Java Features: Added GraalVM Native Image support via ForyFeature and new optimized serializers for blocking queues and final fields.

Features

Bug Fix

Other Improvements

Read more

v0.13.2

04 Dec 16:16

Choose a tag to compare

Highlights

  • perf(rust): use thread local to manage fory rust WriteContext/ReadContext by @chaokunyang in
    #2946
  • feat(rust): add typename to unregistered error message by @chaokunyang in #2881

Features

Bug Fix

Other Improvements

  • docs(java): add logging section by @mosinnik in #2905
  • docs: fix cargo benchmark comand in doc by @chaokunyang in #2897
  • chore: move benchmarks to separate dir to speed up ci build by @chaokunyang in
    #2894
  • chore(CI): Fix cache with symlinks by @PrakashRaj-GK in #2893
  • chore(CI): Add caching for bazel in github workflows by @PrakashRaj-GK in #2888
  • chore(Java): Update java quickstart doc, for note register order-sensitive by @monk in
    #2837
  • docs(rust): remove redundant doc for shared reference by @chaokunyang in #2879
  • chore(rust): fix tuple test comment by @chaokunyang in #2877
  • docs: fix broken table in in java_serialization_guide.md by @mosinnik in #2876

Full Changelog: v0.13.1...v0.13.2