# apache/fory

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/apache-fory).**

4,234 stars · 379 forks · Java · apache-2.0

## Links

- GitHub: https://github.com/apache/fory
- Homepage: https://fory.apache.org
- awesome-repositories: https://awesome-repositories.com/repository/apache-fory.md

## Topics

`compression` `cpp` `cross-language` `encoding` `fast` `golang` `hacktoberfest` `java` `javascript` `jit` `lightning` `marshalling` `multiple-language` `persistence` `python` `rpc` `rust` `serialization` `transfer` `zero-copy`

## Description

Fory is a cross-language serialization framework and binary data serializer designed to convert complex object graphs into a compact binary format for high-performance data exchange. It includes an IDL-based schema compiler to transform interface definition language files into type-safe native data models and a schema evolution manager to maintain forward and backward compatibility.

The project features a zero-copy data access layer that allows reading specific fields from binary rows without deserializing the entire object. It supports dual-mode serialization, enabling a toggle between a portable wire mode for multi-language interoperability and a native mode optimized for single-language performance.

The framework covers a broad range of capabilities, including reference-tracking for circular dependencies, polymorphic type handling, and secure deserialization through type whitelisting and depth limiting. It further provides integration for columnar data transformation for analytics and the generation of service companions for remote procedure calls.

Native binaries can be produced via ahead-of-time compilation to reduce startup time and memory consumption.

## Tags

### Data & Databases

- [Language-Neutral Data Serialization](https://awesome-repositories.com/f/data-databases/data-serialization-formats/binary-serialization-protocols/language-neutral-data-serialization.md) — Converts complex data structures into a compact binary format for efficient exchange between different programming languages.
- [High-Performance Binary Serialization](https://awesome-repositories.com/f/data-databases/high-performance-binary-serialization.md) — Provides high-performance conversion of complex object graphs into compact binary formats for minimal latency.
- [Binary Deserialization](https://awesome-repositories.com/f/data-databases/binary-data-accessors/binary-deserialization.md) — Reconstructs native language objects from binary streams based on a shared schema. ([source](https://fory.apache.org/docs/guide/dart/))
- [Cross-Language Data Protocols](https://awesome-repositories.com/f/data-databases/cross-language-data-protocols.md) — Provides standardized binary layouts to ensure data compatibility across different programming languages and hardware architectures. ([source](https://cdn.jsdelivr.net/gh/apache/fory@main/README.md))
- [Schema Compatibility Validators](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/schema-compatibility-validators.md) — Matches local fields against remote metadata to ensure backward and forward compatibility during data evolution. ([source](https://fory.apache.org/docs/specification/java_serialization_spec))
- [Data Schema Management](https://awesome-repositories.com/f/data-databases/data-schema-management.md) — Defines data structures using builders or decorators to create optimized serialization functions. ([source](https://fory.apache.org/docs/guide/javascript/))
- [Schema Versioning](https://awesome-repositories.com/f/data-databases/data-schema-management/schema-versioning.md) — Matches local fields against remote metadata identifiers to maintain forward and backward compatibility during schema evolution.
- [Random Field Accesses](https://awesome-repositories.com/f/data-databases/random-field-accesses.md) — Reads individual data fields from a binary row without deserializing the entire record. ([source](https://fory.apache.org/docs/specification/row_format_spec))
- [IDL Model Generation](https://awesome-repositories.com/f/data-databases/schema-generators/idl-model-generation.md) — Produces compiler output for models and schema modules to define data structures used for serialization from IDL files. ([source](https://fory.apache.org/docs/guide/kotlin/))
- [IDL Compilers](https://awesome-repositories.com/f/data-databases/schema-validation-libraries/schema-compilers/idl-compilers.md) — Transforms interface definition language files into type-safe native data models and serialization code.
- [Zero-Copy Data Access](https://awesome-repositories.com/f/data-databases/zero-copy-data-access.md) — Enables reading specific data fields directly from binary buffers without reconstructing the entire object hierarchy.
- [Columnar Data Processors](https://awesome-repositories.com/f/data-databases/columnar-data-processors.md) — Implements a high-performance engine for processing and converting row-based serialized data into columnar layouts. ([source](https://fory.apache.org/docs/introduction/features))
- [Kotlin Type Serialization](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/kotlin-type-serialization.md) — Converts Kotlin data classes, unsigned primitives, and ranges into a compact binary format. ([source](https://fory.apache.org/docs/guide/kotlin/))
- [Inheritance Management](https://awesome-repositories.com/f/data-databases/data-schema-management/inheritance-management.md) — Allows including fields from base classes into derived types to maintain structured data hierarchies. ([source](https://fory.apache.org/docs/guide/cpp/))
- [Polymorphic Type Serializers](https://awesome-repositories.com/f/data-databases/data-type-managers/dynamic-type-managers/custom-type-serializers/polymorphic-type-serializers.md) — Serializes objects based on their actual runtime types to support inheritance hierarchies. ([source](https://fory.apache.org/docs/introduction/features))
- [Analytics-Optimized Row Formats](https://awesome-repositories.com/f/data-databases/database-schema-mapping/row-mapping-logic/row-record-access/tabular-row-storage/page-based-row-formats/analytics-optimized-row-formats.md) — Encodes data in a row format to enable high-throughput processing and zero-copy access for analytics. ([source](https://cdn.jsdelivr.net/gh/apache/fory@main/README.md))
- [Collection Serialization](https://awesome-repositories.com/f/data-databases/key-value-pair-managers/map-serialization/collection-serialization.md) — Encodes collections and maps with optimized headers for element type sharing and nullability. ([source](https://fory.apache.org/docs/specification/java_serialization_spec))
- [Temporal Data Converters](https://awesome-repositories.com/f/data-databases/temporal-data-converters.md) — Serializes timestamps, dates, and durations using standardized epoch-based offsets and nanosecond adjustments. ([source](https://fory.apache.org/docs/specification/xlang_serialization_spec))
- [Zero-Copy Deserialization](https://awesome-repositories.com/f/data-databases/zero-copy-data-access-libraries/zero-copy-deserialization.md) — Reads binary data directly from a buffer without allocating new memory for reconstructed objects. ([source](https://fory.apache.org/docs/guide/rust/))

### Development Tools & Productivity

- [Schema-Based Code Generators](https://awesome-repositories.com/f/development-tools-productivity/schema-based-code-generators.md) — Compiles language-independent IDL schema definitions into native data structures and type-safe serialization helpers.
- [Native AOT Compilation](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/native-aot-compilation.md) — Generates native binaries using ahead-of-time compilation to reduce startup time and memory usage. ([source](https://fory.apache.org/docs/guide/java/graalvm_support))

### Networking & Communication

- [Cross-Language Serialization Frameworks](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/inter-process-communication/cross-language-serialization-frameworks.md) — Implements a system for converting object graphs into binary formats to ensure type-safe communication across different languages.
- [Remote Procedure Call Frameworks](https://awesome-repositories.com/f/networking-communication/remote-procedure-call-frameworks.md) — Generates type-safe service definitions and serialization helpers for low-latency communication between distributed services.

### Programming Languages & Runtimes

- [Type Mapping](https://awesome-repositories.com/f/programming-languages-runtimes/cross-language-data-mapping/type-mapping.md) — Translates schema expressions and wire tags into native data types to ensure consistent cross-language data exchange. ([source](https://fory.apache.org/docs/specification/xlang_type_mapping))
- [Object Serialization](https://awesome-repositories.com/f/programming-languages-runtimes/object-serialization.md) — Encodes complex Java object graphs and primitive arrays into a compact binary format. ([source](https://fory.apache.org/docs/specification/java_serialization_spec))
- [Interoperability Modes](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability-modes.md) — Enables switching between a portable wire mode for multi-language interoperability and a native mode for optimized performance. ([source](https://fory.apache.org/docs/guide/cpp/))
- [Whitelisted Deserialization](https://awesome-repositories.com/f/programming-languages-runtimes/object-deserialization/whitelisted-deserialization.md) — Protects against unauthorized code execution by restricting object instantiation to a set of registered trusted types during decoding.

### Software Engineering & Architecture

- [Serializer Code Generators](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation/serializer-code-generators.md) — Produces companion files from marked classes to automate the conversion between high-level objects and binary data. ([source](https://fory.apache.org/docs/guide/swift/))
- [Reference Tracking](https://awesome-repositories.com/f/software-engineering-architecture/dependency-resolution-engines/circular-reference-detection/reference-tracking.md) — Tracks object identities during encoding to preserve shared references and resolve circular dependencies in complex object graphs.
- [Schema Evolution Strategies](https://awesome-repositories.com/f/software-engineering-architecture/schema-evolution-strategies.md) — Maintains backward and forward compatibility of data models through an IDL-based schema evolution manager.
- [Wire Format Interoperability](https://awesome-repositories.com/f/software-engineering-architecture/wire-format-interoperability.md) — Implements a standardized binary layout and schema mapping to maintain data compatibility across different programming runtimes.
- [Enum Tagging Strategies](https://awesome-repositories.com/f/software-engineering-architecture/data-serialization-formats/enum-tagging-strategies.md) — Implements configurable strategies for encoding enum constants using ordinals, numeric tags, or string names. ([source](https://fory.apache.org/docs/specification/java_serialization_spec))
- [Static Serialization Engines](https://awesome-repositories.com/f/software-engineering-architecture/data-serialization-formats/static-serialization-engines.md) — Generates serializers via annotation processing to enable reflection-free, compact data exchange. ([source](https://fory.apache.org/docs/guide/kotlin/android_support/))
- [Circular Reference Detection](https://awesome-repositories.com/f/software-engineering-architecture/dependency-resolution-engines/circular-reference-detection.md) — Tracks object identities during serialization to handle circular dependencies and shared references. ([source](https://fory.apache.org/docs/guide/python/))
- [Dual-Mode Serialization](https://awesome-repositories.com/f/software-engineering-architecture/dual-mode-serialization.md) — Allows toggling between a portable wire mode for interoperability and a native mode optimized for single-language performance.
- [Deserialization Depth Limiting](https://awesome-repositories.com/f/software-engineering-architecture/generic-type-definitions/generic-type-resolution/recursive-type-resolution/recursive-data-generators/recursion-depth-tracking/deserialization-depth-limiting.md) — Protects against recursive object attacks using depth limiting and type whitelists. ([source](https://fory.apache.org/docs/introduction/features))
- [Symmetric Language Optimizations](https://awesome-repositories.com/f/software-engineering-architecture/symmetric-language-optimizations.md) — Uses a native serialization mode to leverage language-specific type systems when producers and consumers share a language. ([source](https://cdn.jsdelivr.net/gh/apache/fory@main/README.md))

### Web Development

- [Multi-Language Model Generators](https://awesome-repositories.com/f/web-development/api-client-generators/multi-language-model-generators.md) — Generates native data structures and type-safe models across multiple languages from a single shared contract. ([source](https://cdn.jsdelivr.net/gh/apache/fory@main/README.md))
- [Serialization Hooks](https://awesome-repositories.com/f/web-development/serialization-hooks.md) — Implements mechanisms for customizing serialization behavior, including object replacement and proxy handling. ([source](https://fory.apache.org/docs/specification/java_serialization_spec))

### Scientific & Mathematical Computing

- [Decimal Arithmetic Types](https://awesome-repositories.com/f/scientific-mathematical-computing/floating-point-arithmetic/decimal-arithmetic-types.md) — Represents exact decimal values using a signed scale and unscaled integer to avoid binary floating-point precision errors. ([source](https://fory.apache.org/docs/specification/xlang_serialization_spec))

### Security & Cryptography

- [Deserialization Security](https://awesome-repositories.com/f/security-cryptography/deserialization-security.md) — Protects against unauthorized type instantiation and recursive object attacks through whitelists and depth limiting.
