Documentation Β· Examples Β· Benchmarks Β· Contributing
Nalix is a modular, high-performance networking framework for .NET 10. It provides a complete stack for building real-time server applications β from low-level transport (TCP/UDP) to middleware pipelines, packet routing, and client SDKs β with a focus on zero-allocation hot paths, pluggable protocols, and enterprise-grade security.
| Platform | Status |
|---|---|
| Category | Highlights |
|---|---|
| Cross-Platform | Runs on Windows, Linux, and macOS with .NET 10+. |
| High Performance | Zero-allocation serialization, shard-aware dispatch, and buffer pooling for thousands of concurrent connections. |
| Security-First | AEAD encryption (ChaCha20-Poly1305), Static-Ephemeral X25519 (Noise Protocol) with server identity pinning, and zero-RTT session resumption. |
| Pluggable Protocols | Swap network, serialization, or security protocols without modifying core logic. |
| Middleware Pipeline | Built-in authentication, rate limiting, traffic shaping, and audit logging β or write your own. |
| Real-Time Updates | Instant messaging, state synchronization, and live event broadcasting. |
| Extensible | Attribute-based packet routing, auto-discovered controllers, and fluent builder APIs. |
| Modern C# | Leverages C# 14 features β Span<T>, ref struct, pattern matching, and more. |
| Requirement | Version |
|---|---|
| .NET SDK | 10.0+ |
| C# Language | 14+ |
| IDE | Visual Studio 2026 / VS Code / Rider |
- Language: C# 14 on .NET 10
- Testing: xUnit + BenchmarkDotNet
- CI/CD: GitHub Actions (Linux & Windows)
- Packaging: NuGet
All benchmarks run on .NET 10.0, Windows 11, using BenchmarkDotNet v0.15.8.
- CPU: 13th Gen Intel Core i7-13620H (10C/16T)
- Runtime: .NET
10.0.5(X64 RyuJIT, Server GC) - SDK: .NET SDK
10.0.201 - Job config:
IterationCount=20,LaunchCount=3,WarmupCount=10,RunStrategy=Throughput
| Serializer | Serialize | Deserialize | Allocated |
|---|---|---|---|
| LiteSerializer | 149.9 ns | 142.9 ns | 664β856 B |
| MemoryPack | 121.6 ns | 145.0 ns | 664β888 B |
| MessagePack | 422.5 ns | 1,095.2 ns | 504β888 B |
| System.Text.Json | 897.7 ns | 2,548.2 ns | 1,976β7,200 B |
More details: See the
docs/benchmarksfolder for full data and additional test cases.
Nalix is composed of several modular packages β install only what you need.
| Package | Description |
|---|---|
| Nalix.Abstractions | Base abstractions, enums, and shared contracts for the Nalix ecosystem. |
| Nalix.Codec | High-performance framing, cryptography, and serialization. |
| Nalix.Environment | Low-level IO primitives, buffer leasing, and configuration loading. |
| Nalix.Framework | High-performance core: cryptography, identity, DI, serialization, and task orchestration. |
| Nalix.Runtime | Packet dispatching, middleware pipelines, protection primitives, and throttling. |
| Package | Description |
|---|---|
| Nalix.Network | High-performance TCP/UDP transport, connection management, and session persistence. |
| Nalix.Hosting | Microsoft-style host and builder APIs for quick bootstrapping. |
| Package | Description |
|---|---|
| Nalix.SDK | Client-side SDK: transport sessions, request/response patterns, and encryption. |
| Nalix.Analyzers | Roslyn analyzers and code fixes to enforce Nalix best practices. |
| Nalix.Analyzers.Generators | Source generators and analyzers. |
Build a high-performance network application in minutes:
using Nalix.Hosting;
using Nalix.Network.Options;
using Nalix.Runtime.Handlers;
using Nalix.Hosting.Protocols;
// Initialize and configure the application host
using var host = NetworkApplication.CreateBuilder()
.ListenTcp<DefaultProtocol>().OnPort(8080).Bind()
.MapHandlers<HandshakeHandlers>()
.Configure<NetworkSocketOptions>(opt => opt.NoDelay = true)
.Build();
// Run the server
await host.RunAsync();See the examples directory for complete implementation details.
# Core server setup
dotnet add package Nalix.Network.Hosting
# Optional: client SDK
dotnet add package Nalix.SDK
# Optional: Roslyn analyzers
# Optional: Roslyn analyzers generators
dotnet add package Nalix.AbstractionsPlease read CONTRIBUTING.md for the development workflow, commit conventions, and pull request guidelines. Follow our Code of Conduct and submit PRs with proper documentation and tests.
Please review our Security Policy for supported versions and vulnerability reporting procedures.
Nalix is copyright Β© PhcNguyen β provided under the Apache License, Version 2.0.
For questions, suggestions, or support, open an issue on GitHub or contact the maintainers at ppn.system@gmail.com.