Skip to content

fix(deps): update fory to v0.17.0#21

Open
rossdanderson wants to merge 1 commit into
mainfrom
renovate/fory
Open

fix(deps): update fory to v0.17.0#21
rossdanderson wants to merge 1 commit into
mainfrom
renovate/fory

Conversation

@rossdanderson
Copy link
Copy Markdown
Collaborator

This PR contains the following updates:

Package Change Age Confidence
org.apache.fory:fory-kotlin (source) 0.15.00.17.0 age confidence
org.apache.fory:fory-core 0.15.00.17.0 age confidence

Release Notes

apache/fory (org.apache.fory:fory-core)

v0.17.0

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.

Datatype Operation Fory TPS Protobuf TPS JSON TPS Fastest
Struct Serialize 8,453,950 1,903,706 3,058,232 fory
Struct Deserialize 9,705,287 8,233,664 3,860,538 fory
Sample Serialize 1,498,391 422,620 744,790 fory
Sample Deserialize 1,918,162 819,010 762,048 fory
MediaContent Serialize 1,293,157 729,497 1,299,908 json
MediaContent Deserialize 1,638,086 1,209,140 921,191 fory
StructList Serialize 3,928,325 495,648 891,810 fory
StructList Deserialize 3,264,827 1,529,744 986,144 fory
SampleList Serialize 355,581 92,741 163,120 fory
SampleList Deserialize 424,916 163,253 162,520 fory
MediaContentList Serialize 286,053 148,977 282,445 fory
MediaContentList Deserialize 376,826 244,622 190,155 fory

Serialized data sizes (bytes):

Datatype Fory Protobuf JSON
Struct 58 61 103
Sample 446 377 724
MediaContent 391 307 596
StructList 184 315 537
SampleList 1980 1900 3642
MediaContentList 1665 1550 3009

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,
}

@&#8203;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.

Datatype Operation Fory TPS Protobuf TPS Fastest
Struct Serialize 3,989,432 1,884,653 fory (2.12x)
Struct Deserialize 5,828,197 4,199,680 fory (1.39x)
Sample Serialize 1,649,722 500,167 fory (3.30x)
Sample Deserialize 2,060,113 785,109 fory (2.62x)
MediaContent Serialize 800,876 391,235 fory (2.05x)
MediaContent Deserialize 1,315,115 683,533 fory (1.92x)
StructList Serialize 1,456,396 367,506 fory (3.96x)
StructList Deserialize 1,921,006 645,958 fory (2.97x)
SampleList Serialize 411,144 48,508 fory (8.48x)
SampleList Deserialize 464,273 103,558 fory (4.48x)
MediaContentList Serialize 186,870 77,029 fory (2.43x)
MediaContentList Deserialize 330,293 128,215 fory (2.58x)

Serialized data sizes (bytes):

Datatype Fory Protobuf
Struct 58 61
Sample 446 377
MediaContent 365 307
StructList 184 315
SampleList 1980 1900
MediaContentList 1535 1550

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

Highlights

Features

Bug Fix

Other Improvements

New Contributors

Full Changelog: apache/fory@v0.16.0...v0.17.0

v0.16.0

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

Highlights

C# Serialization: First Release

Apache Fory 0.16.0 is the first release with official C# serialization support.
The C# runtime targets modern .NET workloads and brings the same object graph,
cross-language, and schema-evolution model available in other Fory runtimes.

Key capabilities:

  • High-performance binary serialization for .NET 8+ with source-generator-based serializers for [ForyObject] types
  • Cross-language mode with Java, Python, C++, Go, Rust, and JavaScript
  • Optional reference tracking for shared and circular object graphs
  • Compatible mode for schema evolution
  • Dynamic object payloads, custom serializers, and namespace/name registration APIs
  • ThreadSafeFory wrapper for concurrent service workloads
  • C# target support in the Fory IDL/compiler workflow
Quick Start
using Apache.Fory;

[ForyObject]
public sealed class User
{
    public long Id { get; set; }
    public string Name { get; set; } = string.Empty;
    public string? Email { get; set; }
}

Fory fory = Fory.Builder()
    .Xlang(true)
    .Compatible(true)
    .Build();
fory.Register<User>(1);

byte[] payload = fory.Serialize(new User
{
    Id = 1,
    Name = "Alice",
    Email = "alice@example.com",
});
User decoded = fory.Deserialize<User>(payload);
C# 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 39.2 121.5 66.0
Struct Deserialize 58.3 180.1 102.6
Sample Serialize 269.2 562.6 339.6
Sample Deserialize 175.6 1084.9 531.8
MediaContent Serialize 306.3 434.7 351.5
MediaContent Deserialize 379.4 718.8 676.9
StructList Serialize 136.1 468.5 266.9
StructList Deserialize 221.1 687.0 488.5
SampleList Serialize 1198.9 2811.9 1635.7
SampleList Deserialize 791.5 5174.5 2629.2
MediaContentList Serialize 1393.9 2199.4 1710.9
MediaContentList Deserialize 1719.5 3373.1 3401.2

Serialized data sizes (bytes):

Data Type Fory Protobuf Msgpack
Struct 58 61 55
Sample 446 460 562
MediaContent 365 307 479
StructList 184 315 284
SampleList 1980 2315 2819
MediaContentList 1535 1550 2404

Benchmark details: https://fory.apache.org/docs/benchmarks/csharp/

Swift Serialization: First Release

Apache Fory 0.16.0 is also the first release with official Swift serialization
support. The Swift implementation focuses on idiomatic API design, macro-based
model serialization, cross-language compatibility, and strong support for object
graph workloads.

Key capabilities:

  • High-performance serialization for Swift value and reference types
  • @ForyObject macro for zero-boilerplate model serialization
  • Cross-language protocol compatibility with Java, Python, C++, Go, Rust, and JavaScript
  • Compatible mode for schema evolution across versions
  • Dynamic value support for Any, AnyObject, any Serializer, and AnyHashable
  • Reference tracking for shared/circular graphs, including weak references on classes
  • Swift target support in the Fory IDL/compiler workflow
Quick Start
import Fory

@&#8203;ForyObject
struct User: Equatable {
    var name: String = ""
    var age: Int32 = 0
}

let fory = Fory(xlang: true, trackRef: false, compatible: true)
fory.register(User.self, id: 1)

let input = User(name: "Alice", age: 30)
let data = try fory.serialize(input)
let output: User = try fory.deserialize(data)
Swift Benchmarks

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

Data Type Operation Fory Protobuf Msgpack Fastest
Struct Serialize 9,727,950 6,572,406 141,248 fory (1.48x)
Struct Deserialize 11,889,570 8,584,510 99,792 fory (1.39x)
Sample Serialize 3,496,305 1,281,983 17,188 fory (2.73x)
Sample Deserialize 1,045,018 765,706 12,767 fory (1.36x)
MediaContent Serialize 1,425,354 678,542 29,048 fory (2.10x)
MediaContent Deserialize 614,447 478,298 12,711 fory (1.28x)
StructList Serialize 3,307,962 1,028,210 24,781 fory (3.22x)
StructList Deserialize 2,788,200 708,596 8,160 fory (3.93x)
SampleList Serialize 715,734 205,380 3,361 fory (3.48x)
SampleList Deserialize 199,317 133,425 1,498 fory (1.49x)
MediaContentList Serialize 364,097 103,721 5,538 fory (3.51x)
MediaContentList Deserialize 103,421 86,331 1,529 fory (1.20x)

Serialized data sizes (bytes):

Data Type Fory Protobuf Msgpack
MediaContent 365 301 524
MediaContentList 1535 1520 2639
Sample 446 375 737
SampleList 1980 1890 3698
Struct 58 61 65
StructList 184 315 338

Benchmark details: https://fory.apache.org/docs/benchmarks/swift/

Features

Bug Fix

Other Improvements

New Contributors


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants