https://github.com/JasonXuDeveloper/Nino
Ultimate high-performance binary serialization library for C#.
https://github.com/JasonXuDeveloper/Nino
c-sharp csharp deserialization dotnet godot serialization unity
Last synced: 6 months ago
JSON representation
Ultimate high-performance binary serialization library for C#.
- Host: GitHub
- URL: https://github.com/JasonXuDeveloper/Nino
- Owner: JasonXuDeveloper
- License: mit
- Created: 2022-04-25T06:46:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-08-13T08:26:11.000Z (7 months ago)
- Last Synced: 2025-08-13T10:17:40.947Z (7 months ago)
- Topics: c-sharp, csharp, deserialization, dotnet, godot, serialization, unity
- Language: C#
- Homepage: https://nino.xgamedev.net
- Size: 8.65 MB
- Stars: 571
- Watchers: 14
- Forks: 53
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - https://github.com/JasonXuDeveloper/Nino
README
# Nino
**Ultimate high-performance binary serialization library for C#**
[](https://github.com/JasonXuDeveloper/Nino/actions)
[](https://github.com/JasonXuDeveloper/Nino/blob/main/LICENSE)
[](https://www.nuget.org/packages/Nino)
[](https://openupm.com/packages/com.jasonxudeveloper.nino/)
[🌐 **Official Website**](https://nino.xgamedev.net/en/) • [📚 **Documentation**](https://nino.xgamedev.net/en/doc/start) • [🚀 **Performance**](https://nino.xgamedev.net/en/perf/micro) • [🇨🇳 **中文**](README.zh.md)
*Fast, flexible, and effortless C# binary serialization*
---
## ✨ Why Choose Nino?
🔧 Seamless Integration
Leverages C# Source Generators for automatic compile-time code generation. Zero manual setup required.
⚡ Blazing Performance
Engineered for high-throughput, low-latency scenarios with minimal GC pressure and memory allocation.
🎮 Unity Compatible
Works seamlessly with Unity projects and native Unity data types like Vector3 and Quaternion.
🛠️ Advanced Features
Handles complex scenarios like polymorphism, versioning, custom constructors, and private member serialization.
---
## 🎯 Core Features
### 🚀 **Performance & Reliability**
- **High-Speed Serialization**: Consistently ranks among the fastest C# binary serializers
- **Low Memory Footprint**: Minimal GC pressure and memory allocation
- **By-Reference Deserialization**: Deserialize directly into existing objects to eliminate allocation overhead
- **Thread-Safe Operations**: Fully concurrent serialization/deserialization without external locking
- **Data Integrity**: Built-in type checking ensures data consistency
### 🧩 **Comprehensive Type Support**
- **Primitives & Built-ins**: Full support for all C# primitive types (`int`, `float`, `DateTime`, etc.)
- **Modern C# Features**: `records`, `record structs`, `structs`, `classes`, and generics
- **Collections**: Any `IEnumerable` including `List`, `Dictionary`, `HashSet`, `ConcurrentDictionary`
- **Advanced Generics**: Complex nested types like `Dictionary>`
- **Value Types**: `ValueTuple`, `Tuple`, `KeyValuePair`, `Nullable`
### 🎮 **Unity & Cross-Platform**
- **Unity Native Types**: `Vector3`, `Quaternion`, `Matrix4x4`, and other Unity-specific data types
- **Cross-Assembly Support**: Serialize types across different .NET assemblies and projects
- **Platform Agnostic**: Works seamlessly across different .NET implementations
### ⚙️ **Advanced Control**
- **Polymorphism**: Interface and abstract class serialization with type preservation
- **Custom Constructors**: `[NinoConstructor]` for immutable types and factory patterns
- **Versioning & Migration**: `[NinoMember]` ordering and `[NinoFormerName]` for backward compatibility
- **Privacy Control**: `[NinoType(true)]` to include private/protected members
- **Selective Serialization**: `[NinoIgnore]` to exclude specific fields
- **String Optimization**: `[NinoUtf8]` for efficient UTF-8 string handling
---
## 📖 Quick Start
### Installation
**Standard .NET Projects:**
```bash
dotnet add package Nino
```
**Unity Projects (via OpenUPM):**
```bash
openupm add com.jasonxudeveloper.nino
```
### Basic Usage
```csharp
[NinoType]
public class GameData
{
public int Score;
public string PlayerName;
public DateTime LastPlayed;
}
// Serialize
var data = new GameData { Score = 1000, PlayerName = "Player1", LastPlayed = DateTime.Now };
byte[] bytes = NinoSerializer.Serialize(data);
// Deserialize
var restored = NinoDeserializer.Deserialize(bytes);
```
**[📚 Full Documentation →](https://nino.xgamedev.net/en/doc/start)**
---
## 📊 Performance
Nino consistently delivers exceptional performance across various scenarios. See detailed benchmarks and comparisons with other popular serialization libraries.
**[🚀 View Benchmarks →](https://nino.xgamedev.net/en/perf/micro)**
---
## 🤝 Community & Support
[](https://github.com/JasonXuDeveloper/Nino/issues)
[](https://github.com/JasonXuDeveloper/Nino/stargazers)
[](https://github.com/JasonXuDeveloper/Nino/network)
**[🐛 Report Issues](https://github.com/JasonXuDeveloper/Nino/issues)** • **[💡 Feature Requests](https://github.com/JasonXuDeveloper/Nino/issues)** • **[🔀 Contribute](https://github.com/JasonXuDeveloper/Nino/pulls)**
---
**Made with ❤️ by [JasonXuDeveloper](https://github.com/JasonXuDeveloper)**
*Licensed under [MIT License](LICENSE)*