Nalix.Runtime 13.0.0

dotnet add package Nalix.Runtime --version 13.0.0
                    
NuGet\Install-Package Nalix.Runtime -Version 13.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nalix.Runtime" Version="13.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nalix.Runtime" Version="13.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Nalix.Runtime" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nalix.Runtime --version 13.0.0
                    
#r "nuget: Nalix.Runtime, 13.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nalix.Runtime@13.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nalix.Runtime&version=13.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Nalix.Runtime&version=13.0.0
                    
Install as a Cake Tool

Nalix.Runtime

Application-level execution engine — handles packet routing, shard-aware Weighted Round-Robin dispatch, throttling, sessions, and middleware execution.

Key Features

Feature Description Key Concept / Type
Packet Dispatch Shard-aware Weighted Round-Robin execution loops decoupling packet handling from network socket threads. PacketDispatchChannel, PacketContext
🛤️ Middleware Pipeline Highly performant inbound and outbound packet interceptor chain with custom ordering. MiddlewarePipeline, IPacketMiddleware
🎯 Controllers Attribute-based compile-time generated routing routes via static controllers. [PacketController], [PacketOpcode]
💾 Session Tracking Thread-safe, high-speed in-memory session persistence, factories, and observers. SessionService, InMemorySessionStore
🚦 Traffic Throttling Low-overhead request rate limiters and concurrent execution gate filters. ConcurrencyGate, TokenBucketLimiter

Key Namespaces

Namespace Purpose Key Types
Nalix.Runtime.Dispatching Shard-aware concurrent message dispatch channels and packet contexts PacketDispatchChannel, PacketContext, PacketDispatcherBase
Nalix.Runtime.Middleware Inbound/outbound pipeline engines and standard middleware blocks MiddlewarePipeline, RateLimitMiddleware, TimeoutMiddleware
Nalix.Runtime.Handlers Pre-built core handshake, key exchange, and system controllers SessionHandlers, HandshakeHandlers, KeyExchangeHandlers
Nalix.Runtime.Throttling Microsecond-optimized concurrency controls and rate limiting filters ConcurrencyGate, TokenBucketLimiter, PolicyRateLimiter
Nalix.Runtime.Sessions Distributed session services, persistence caches, and session stores SessionService, InMemorySessionStore, SessionPersistenceObserver
Nalix.Runtime.Timekeeping Monotonic time synchronization and clock skew adapters TimeSynchronizer
Nalix.Runtime.Options Option models mapping settings for dispatchers and throttling rules DispatchOptions, TokenBucketOptions, SessionStoreOptions

Installation

dotnet add package Nalix.Runtime

Quick Example: Middleware

using System;
using System.Threading;
using System.Threading.Tasks;
using Nalix.Abstractions.Middleware;
using Nalix.Abstractions.Networking.Packets;

public class MyLoggingMiddleware<T> : IPacketMiddleware<T> where T : IPacket
{
    public async ValueTask InvokeAsync(
        IPacketContext<T> context,
        Func<CancellationToken, ValueTask> next)
    {
        Console.WriteLine($"In-flight packet: {typeof(T).Name}");
        await next(context.CancellationToken);
    }
}

Quick Example: Packet Controller

Nalix uses compile-time source generation to discover and compile routing paths for your packets. To handle incoming packets, decorate your controllers with the [PacketController] attribute and define static methods annotated with [PacketOpcode]:

using System;
using System.Threading.Tasks;
using Nalix.Abstractions.Networking;
using Nalix.Abstractions.Networking.Packets;

[PacketController("Chat")]
public sealed class ChatController
{
    [PacketOpcode(201)] // Handles ChatMessage packets (Opcode = 201)
    [PacketPermission(PermissionLevel.USER)]
    public static async ValueTask HandleMessageAsync(IPacketContext<ChatMessage> context)
    {
        ChatMessage packet = context.Packet;
        string user = context.Connection.Attributes["Username"] as string ?? "Anonymous";

        // Perform text verification
        if (string.IsNullOrWhiteSpace(packet.Text))
        {
            return;
        }

        // Broadcast chat text to all active connections in the hub
        IConnectionHub? hub = context.Connection.GetHub();
        if (hub is not null)
        {
            await hub.BroadcastAsync(new ChatBroadcast
            {
                Sender = user,
                Text = packet.Text
            }, async (conn, msg) => await conn.TCP.SendAsync(msg));
        }
    }
}

Documentation

Learn about the Middleware Pipeline and Shard-Aware Dispatch.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Nalix.Runtime:

Package Downloads
Nalix.Hosting

Nalix.Hosting provides Microsoft-style host and builder APIs for the Nalix ecosystem. It wires configuration loading, diagnostic event bridging, packet dispatch, and TCP/UDP listener lifecycle into a familiar builder/build/start workflow for quickly bootstrapping Nalix-based servers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.0.0 45 6/6/2026
12.6.0 126 5/26/2026
12.5.1 124 5/24/2026
12.5.0 113 5/23/2026
12.4.1 109 5/17/2026
12.4.0 101 5/17/2026
12.3.0 106 5/15/2026
12.2.5 102 5/14/2026
12.2.4 111 5/8/2026
12.2.1 105 5/4/2026
12.2.0 97 5/4/2026
12.1.2 115 4/26/2026
12.1.1 107 4/25/2026
12.1.0 123 4/24/2026
12.0.9 110 4/19/2026
12.0.8 122 4/16/2026
12.0.7 114 4/10/2026
12.0.6 117 4/10/2026
12.0.5 121 4/9/2026

- Smart Dispatching: Implemented Weighted Round-Robin (DRR) in PacketDispatchChannel to ensure fair processing and eliminate priority starvation.
- Configurable Fairness: Added PriorityWeights to DispatchOptions, allowing fine-grained control over how urgent vs. background traffic is served.
- Zero-Allocation Hot-Path: Optimized MiddlewarePipeline and PacketContext for minimum heap allocation during high-frequency message processing.
- Advanced Resource Control: Improved concurrency management and synchronization primitives for stable execution under extreme load.