Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. .NET
  3. FlatSharp

FlatSharp

Apache-2.0C#7.9.0

A high-performance, idiomatic C# implementation of Google's FlatBuffers zero-copy binary serialization format.

GitHubGitHub
570 stars59 forks0 contributors

What is FlatSharp?

FlatSharp is a C# implementation of Google's FlatBuffers, a zero-copy binary serialization format designed for high-performance applications. It allows efficient serialization and deserialization of data with minimal memory overhead, leveraging modern .NET features like `Memory<T>` and `Span<T>` for safe, fast operations. The library solves the need for rapid data access in performance-critical scenarios, such as game development, real-time systems, and large-scale data processing.

Target Audience

C# developers building high-performance applications, particularly in game development (Unity), real-time systems, gRPC services, or any scenario where low-latency data serialization is required. It's also suitable for projects targeting AOT compilation or cross-platform frameworks like Blazor and Xamarin.

Value Proposition

Developers choose FlatSharp for its combination of safety, speed, and idiomatic C# design, often outperforming unsafe alternatives. Its zero-copy deserialization, multiple deserialization modes, and strong security practices make it a reliable choice for production environments at companies like Microsoft and Unity3D.

Overview

Fast, idiomatic C# implementation of Flatbuffers

Use Cases

Best For

  • High-performance game development in Unity requiring fast data loading
  • Real-time data processing systems where low-latency serialization is critical
  • gRPC services needing efficient binary message formats
  • Applications targeting ahead-of-time (AOT) compilation like NativeAOT
  • Cross-platform projects using Blazor, Xamarin, or Mono
  • Scenarios requiring zero-copy deserialization for large datasets

Not Ideal For

  • Projects requiring human-readable serialization formats like JSON for debugging or external APIs
  • Applications with rapidly evolving data schemas where frequent recompilation of generated code is burdensome
  • Teams preferring reflection-based serializers that don't require separate schema files or build-time tooling

Pros & Cons

Pros

Zero-Copy Deserialization

Enables direct data access from serialized buffers without parsing overhead, leading to ultra-fast read operations as emphasized in the performance benchmarks.

Performance Leadership

Benchmarks show FlatSharp outperforms alternatives like Protobuf.NET and Message Pack C# in both serialization and deserialization times, even with safe code.

Security-First Design

Avoids unsafe code and IL generation, using bounds checking and fuzz testing to prevent vulnerabilities, ensuring robust production use.

Cross-Platform Compatibility

Works with Unity, Blazor, Xamarin, and supports AOT compilation, making it versatile for modern .NET deployments without platform lock-in.

Cons

Schema-First Complexity

Requires defining FBS schema files and integrating the FlatSharp.Compiler into the build process, adding overhead compared to drop-in serializers.

Rigid Schema Evolution

Changes to the schema necessitate regenerating and recompiling C# code, which can slow iterative development compared to dynamic or reflection-based formats.

Real-World Performance Caveats

The README warns that benchmark gains may not translate to practical scenarios due to cache competition, tempering expectations for some use cases.

Frequently Asked Questions

Quick Stats

Stars570
Forks59
Contributors0
Open Issues10
Last commit1 year ago
CreatedSince 2018

Tags

#flatbuffers#aot-compilation#high-performance#csharp#serializer#dotnet#grpc#deserialization#serialization#zero-copy#binary-format#memory-optimization

Built With

.
.NET
C
C++

Included in

.NET21.2k
Auto-fetched 1 day ago

Related Projects

Newtonsoft.JsonNewtonsoft.Json

Json.NET is a popular high-performance JSON framework for .NET

Stars11,293
Forks3,305
Last commit1 month ago
Protobuf.NETProtobuf.NET

Protocol Buffers library for idiomatic .NET

Stars4,951
Forks1,093
Last commit14 days ago
Msgpack-CliMsgpack-Cli

MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]

Stars856
Forks176
Last commit1 year ago
ObjectDumper.NETObjectDumper.NET

ObjectDumper is a utility which aims to serialize C# objects to string for debugging and logging purposes.

Stars429
Forks39
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub