$ account Cysharp
MemoryPack is a high-performance binary serialization library for .NET (C#) that achieves extreme speed through 'zero encoding'βdirect memory copies for blittable types rather than varint/tag-based encodings. It is primarily a library, distributed as multiple NuGet packages, including a Roslyn source generator that compiles serialization code for types marked with [MemoryPackable]. The core library (MemoryPack.Core) provides writer/reader ref structs, a customizable formatter architecture, and support for compression (Brotli), streaming (PipeWriter/PipeReader), version-tolerant and circular-reference serialization, and polymorphism via union types. It integrates with ASP.NET Core via input/output formatters, generates TypeScript/JavaScript serializers for web clients, and ships a Unity package with shims for common Unity types. The codebase is extensively benchmarked and tested, focusing on allocation-free, high-throughput serialization. While not a data research project, it may be used in data pipelines requiring fast, compact binary data exchange.
MessagePipe is a high-performance C# library for in-process and distributed messaging, implementing pub/sub, mediator/CQRS, and request/response patterns with a flexible filter pipeline. It supports both synchronous and asynchronous operations, keyed and keyless subscriptions, and buffered/observable adapters. The library is DI-container agnostic, with first-class integrations for Microsoft.Extensions.DependencyInjection, Unity (Zenject, VContainer), and a built-in lightweight container. Distributed transports include TCP, UDP, Named Pipes, Unix Domain Sockets, Redis, and NATS, with MessagePack binary serialization. A Roslyn analyzer (MPA001) detects forgotten subscription disposal. The codebase is well-structured and performance-optimized (lock-free data structures, pooling, custom awaiters), but suffers from significant code duplication between .NET and Unity variants and embeds large third-party libraries (Zenject, MessagePack) directly in the Unity project, increasing maintenance burden.
ObservableCollections is a high-performance .NET library providing generic observable collections (ObservableList, ObservableDictionary, ObservableHashSet, ObservableQueue, ObservableStack, ObservableRingBuffer, ObservableFixedSizeRingBuffer) with synchronized views, filters, and writable views. It replaces the non-generic, allocation-heavy .NET ObservableCollection with zero-allocation event args using ref structs and ReadOnlySpan. The library is designed for MVVM architectures in WPF, Blazor, Avalonia, Unity, and WinUI, offering both read-only and writable synchronized views that can be bound via INotifyCollectionChanged. It also provides R3 reactive extensions for Rx-style event observation. The codebase is highly optimized, leveraging modern C# features like ref structs, spans, and custom data structures (e.g., RingBuffer, AlternateIndexList) for minimal allocations and maximum performance.