
Apache Fory™ is a blazingly fast multi-language serialization framework for idiomatic domain objects, schema IDL, and cross-language data exchange.
Fory is built for fast, compact serialization across languages and implementations. It works with idiomatic objects in each language, supports shared schemas when you need a contract, and preserves object features such as shared and circular references.
For same-language workloads, Fory provides native serialization modes that support broader language-specific object models:
pickle and cloudpickle in Python-only systems. It supports classes,
modules, functions, and custom object state, with fine-grained
deserialization controls through DeserializationPolicy.Fory also provides specialized formats for other data-processing requirements:
Benchmarks show Fory delivering higher throughput and smaller serialized payloads than common serialization frameworks on representative workloads. Java has the broadest comparison set; the other charts show language-specific results across supported languages.
Java Benchmarks
In Java serialization benchmarks, Fory reaches up to 170x the throughput of JDK serialization on selected workloads.
Python Benchmarks
Rust Benchmarks
Pick your language and run the package-manager command, or paste the dependency block into your build file.
Java
Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
<version>1.7.7</version>
</dependency>
Gradle:
implementation "org.apache.fory:fory-core:1.7.7"
On JDK25+, opening java.lang.invoke to Fory core is also recommended. It avoids the
current-JDK Unsafe fallback and is required when Unsafe access is disabled or unavailable, including
with --sun-misc-unsafe-memory-access=deny. Use ALL-UNNAMED when Fory is on the classpath:
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
Use the Fory core module name when Fory is on the module path:
--add-opens=java.base/java.lang.invoke=org.apache.fory.core
Scala
sbt:
libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.7.7"
Kotlin
Gradle:
implementation("org.apache.fory:fory-kotlin:1.7.7")
Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
<version>1.7.7</version>
</dependency>
Python
pip install pyfory
For row-format support:
pip install "pyfory[format]"
Rust
Cargo.toml:
[dependencies]
fory = "1.7.7"
C++
CMake:
include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
GIT_TAG v1.7.7
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
target_link_libraries(my_app PRIVATE fory::serialization)
Bazel:
# MODULE.bazel
bazel_dep(name = "fory", version = "1.7.7")
git_override(module_name = "fory", remote = "https://github.com/apache/fory.git", commit = "v1.7.7")
# BUILD
deps = ["@fory//cpp/fory/serialization:fory_serialization"]
When building C++ with MSVC, enable the conforming preprocessor option
/Zc:preprocessor; see the C++ installation guide for setup details.
See the C++ installation guide for complete CMake, Bazel, and source-build details.
Go
go get github.com/apache/fory/go/fory
JavaScript/TypeScript
npm install @apache-fory/core
For the Node.js string fast path:
npm install @apache-fory/core @apache-fory/hps
C#
dotnet add package Apache.Fory --version 1.7.7
Dart
```bash dart pub add fory:^1.
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|