Skip to main content

Fory v0.17.0 Released

· 10 min read
Shawn Yang

The Apache Fory team is pleased to announce the 0.17.0 release. This is a major release that includes 71 PR from 19 distinct contributors. See the Install Page to learn how to get the libraries for your platform.

JavaScript/NodeJS Serialization: First Release

Apache Fory 0.17.0 marks the first release with official JavaScript/NodeJS documentation, benchmark coverage, and TypeScript-friendly IDL code generation. The JavaScript runtime is built for modern Node.js services and TypeScript codebases, while preserving Fory's cross-language object model, schema-driven APIs, and optional reference tracking.

Key capabilities:

  • High-performance serialization for JavaScript and TypeScript objects in Node.js
  • Cross-language compatibility with Java, Python, Go, Rust, C#, Swift, and Dart
  • Schema-driven APIs via Type.* builders and TypeScript decorators
  • Optional reference tracking for shared and circular object graphs
  • Compatible mode for schema evolution
  • Configurable depth, binary size, and collection size guardrails
  • JavaScript/TypeScript target support in the Fory IDL/compiler workflow
  • Optional @apache-fory/hps fast string path for Node.js 20+

Quick Start

import Fory, { Type } from "@apache-fory/core";

const userType = Type.struct(
{ typeName: "example.user" },
{
id: Type.int64(),
name: Type.string(),
age: Type.int32(),
},
);

const fory = new Fory();
const { serialize, deserialize } = fory.register(userType);

const bytes = serialize({
id: 1n,
name: "Alice",
age: 30,
});

const user = deserialize(bytes);
console.log(user);

JavaScript Benchmarks

Below are throughput results (ops/sec; higher is better) comparing Fory with Protocol Buffers and JSON across representative data structures.

DatatypeOperationFory TPSProtobuf TPSJSON TPSFastest
StructSerialize8,453,9501,903,7063,058,232fory
StructDeserialize9,705,2878,233,6643,860,538fory
SampleSerialize1,498,391422,620744,790fory
SampleDeserialize1,918,162819,010762,048fory
MediaContentSerialize1,293,157729,4971,299,908json
MediaContentDeserialize1,638,0861,209,140921,191fory
StructListSerialize3,928,325495,648891,810fory
StructListDeserialize3,264,8271,529,744986,144fory
SampleListSerialize355,58192,741163,120fory
SampleListDeserialize424,916163,253162,520fory
MediaContentListSerialize286,053148,977282,445fory
MediaContentListDeserialize376,826244,622190,155fory

Serialized data sizes (bytes):

DatatypeForyProtobufJSON
Struct5861103
Sample446377724
MediaContent391307596
StructList184315537
SampleList198019003642
MediaContentList166515503009

Benchmark details: https://github.com/apache/fory/tree/v0.17.0/benchmarks/javascript

Dart Serialization: First Release

Apache Fory 0.17.0 also marks the first release with official Dart documentation, benchmark coverage, a rebuilt runtime, and Dart IDL support. The Dart implementation focuses on generated serializers, stable cross-language type identity, schema evolution, and predictable APIs for service workloads.

Key capabilities:

  • High-performance Dart serialization with generated code instead of reflection
  • Cross-language compatibility with Java, Python, Go, Rust, C#, Swift, and JavaScript
  • @ForyStruct and @ForyField annotations with build_runner code generation
  • Compatible mode for schema evolution across versions
  • Optional reference tracking for shared and circular object graphs
  • Manual Serializer<T> extension points for advanced or custom types
  • Dart target support in the Fory IDL/compiler workflow

Quick Start

import 'package:fory/fory.dart';

part 'person.fory.dart';

enum Color {
red,
blue,
}

@ForyStruct()
class Person {
Person();

String name = '';
Int32 age = Int32(0);
Color favoriteColor = Color.red;
}

void main() {
final fory = Fory();
PersonFory.register(
fory,
Color,
namespace: 'example',
typeName: 'Color',
);
PersonFory.register(
fory,
Person,
namespace: 'example',
typeName: 'Person',
);

final bytes = fory.serialize(Person()
..name = 'Ada'
..age = Int32(36)
..favoriteColor = Color.blue);
final roundTrip = fory.deserialize<Person>(bytes);
print(roundTrip.name);
}

Dart Benchmarks

Below are throughput results (ops/sec; higher is better) comparing Fory with Protocol Buffers across representative data structures.

DatatypeOperationFory TPSProtobuf TPSFastest
StructSerialize3,989,4321,884,653fory (2.12x)
StructDeserialize5,828,1974,199,680fory (1.39x)
SampleSerialize1,649,722500,167fory (3.30x)
SampleDeserialize2,060,113785,109fory (2.62x)
MediaContentSerialize800,876391,235fory (2.05x)
MediaContentDeserialize1,315,115683,533fory (1.92x)
StructListSerialize1,456,396367,506fory (3.96x)
StructListDeserialize1,921,006645,958fory (2.97x)
SampleListSerialize411,14448,508fory (8.48x)
SampleListDeserialize464,273103,558fory (4.48x)
MediaContentListSerialize186,87077,029fory (2.43x)
MediaContentListDeserialize330,293128,215fory (2.58x)

Serialized data sizes (bytes):

DatatypeForyProtobuf
Struct5861
Sample446377
MediaContent365307
StructList184315
SampleList19801900
MediaContentList15351550

Benchmark details: https://github.com/apache/fory/tree/v0.17.0/benchmarks/dart

Highlights

Features

Bug Fix

Other Improvements

New Contributors

Full Changelog: https://github.com/apache/fory/compare/v0.16.0...v0.17.0