Skip to content

ppn-systems/nalix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,541 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

nalix Banner Claude Code mascot jumping

.NET License NuGet Downloads

Issues PRs Repo Size Commit Activity

Documentation Β· Examples Β· Benchmarks Β· Contributing


πŸ“– About

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.


πŸ› οΈ Build Status

Platform Status
Linux CI
Windows CI

✨ Features

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.

πŸ”§ Requirements

Requirement Version
.NET SDK 10.0+
C# Language 14+
IDE Visual Studio 2026 / VS Code / Rider

πŸ’» Technologies

Technologies

  • Language: C# 14 on .NET 10
  • Testing: xUnit + BenchmarkDotNet
  • CI/CD: GitHub Actions (Linux & Windows)
  • Packaging: NuGet

πŸ“ˆ Benchmarks

All benchmarks run on .NET 10.0, Windows 11, using BenchmarkDotNet v0.15.8.

Environment

  • 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

πŸ”„ Serialization (128 items, DTO payload)

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/benchmarks folder for full data and additional test cases.


πŸ“¦ NuGet Packages

Nalix is composed of several modular packages β€” install only what you need.

πŸ—οΈ Foundation

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.

πŸ“‘ Networking & Hosting

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.

πŸ› οΈ Utilities & Tooling

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.

πŸš€ Quick Start

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.


πŸ“¦ Installation

# 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.Abstractions

πŸ› οΈ Contributing

Please 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.

πŸ›‘οΈ Security

Please review our Security Policy for supported versions and vulnerability reporting procedures.

πŸ“œ License

Nalix is copyright Β© PhcNguyen β€” provided under the Apache License, Version 2.0.

πŸ“¬ Contact

For questions, suggestions, or support, open an issue on GitHub or contact the maintainers at ppn.system@gmail.com.


Give a ⭐️ if this project helped you! Footer

Nalix divider

Sponsor this project

 

Packages

 
 
 

Contributors

Languages