SystemEx is a modular, low‑level extension framework for .NET providing deterministic numeric types, high‑performance collections, STL‑style algorithms, advanced color models, random engines, interop utilities, threading primitives, and bit‑level tools.
It is designed for engine development, simulation, rendering pipelines, compiler tooling, and any environment requiring predictable, allocation‑aware, byte‑level control.
Design Note
SystemEx is intentionally structured to avoid deep cross‑dependencies between modules. In several areas — especially within the collection and numeric subsystems — certain data structures appear in multiple forms or are implemented more than once (for example,
Map<TKey, TValue>usingPair<TKey, TValue>[]instead of reusingVector<Pair<...>>).This duplication is deliberate. SystemEx is a large, highly generic low‑level framework, and isolating components prevents errors or design changes in one subsystem from propagating unpredictably into others. This approach keeps the library stable, easier to debug, and safer to extend, especially when working with complex iterator models, custom numeric types, and engine‑oriented memory layouts.
SystemEx is a personal hobby project developed by a single intersex author; my pronouns are dey/deren/dem/dem. While I aim for correctness, determinism, and clean architecture, not every issue may be visible immediately, and responses or fixes may occasionally be delayed. Constructive feedback, improvement ideas, and technical discussions are always welcome.
SystemEx follows these principles:
- Deterministic behavior
- Zero‑magic, zero‑hidden‑allocation APIs
- Explicit numeric semantics (Half16, Ratio, Fast_Int, Fast_Byte)
- STL‑inspired algorithms and iterators
- Modular namespaces for clean separation
- Engine‑oriented design (Random, Threading, Runtime, Drawing)
- Interop‑friendly (Linux, macOS, Windows dynamic loading)
SystemEx is divided into clear, purpose‑built modules.
Core primitives and utilities:
Buffer,FlexSpanIComparableEx,IRangeMath,NumberRange,NumberRangeIterator,NumberRangeStepper- Base tuple types (
Triple, etc.)
This layer provides the foundation for all other modules.
High‑performance, STL‑style collections:
Vector<T>,FixedVector<T>Deque<T>,Queue<T>,Stack<T>BinQueue<T>,PriorityQueue<T>Set<T>,MultiSet<T>,UnorderedSet<T>Map<TKey, TValue>,MultiMap,SortedMap,FixedMapTuple,Pair,Triple,Quad,TupleList<T>- Node‑based traversal:
Node,NodeChain,NodeRange,NodeSlice,GroupNode,StarNode
All containers support deterministic memory behavior and iterator‑based traversal.
Higher‑level collection models and abstractions built on top of the generic layer.
STL‑style algorithms:
Distance,Find,LowerBound,UpperBoundReverse,Rotate,Copy,MoveMin,Max,Clamp,MinMaxElementLexicographicalCompareForEach,Fill,FillN,Swap
All algorithms operate on SystemEx iterators and avoid allocations.
Advanced color and light models:
ColorR8G8B8,ColorR10G10B10,ColorR16G16B16ColorHSV,ColorHDR(HSV‑based HDR with extended Value range)CMY,XYZ,YUV,NColLightmodelsCanvasrendering utilities
Designed for deterministic color conversion, HDR workflows, and engine pipelines.
Hashing utilities:
BernsteinHashFactoryHashAttribute
Useful for hashing structures, identifiers, and engine metadata.
Low‑level IO utilities:
CacheStreamWriteStream
Optimized for deterministic, buffered IO operations.
A complete numeric subsystem:
Fast_Byte,Fast_IntIFloatabstractionHalf16,Half16b(custom IEEE‑754‑style half precision)Ratio(exact rational type)
vec2/3/4ivec2/3/4dvec2/3/4fvec2/3/4h(Half16)vec2/3/4hb(Half16b)vec2/3/4r(Ratio)
m44f,m44d(not yet public - under working)
AxisAngleProjectionDQuadv
All numeric types are deterministic and engine‑oriented.
High‑quality random engines:
IsaacEngine(ISAAC32)SeedMixerHashedSeed
Suitable for simulation, procedural generation, and cryptographic‑adjacent tasks.
Cross‑platform dynamic interop:
InteropServiceGetProcAddress‑style dynamic loading- Linux, macOS, Windows support
- Cache‑based backend for fast symbol lookup
Ideal for plugin systems, native bindings, and runtime extension.
Lightweight threading primitives:
EventGroup(bit‑level event flags, FreeRTOS‑style)LightConditionalVariableLightCountingSpinlock(pure user‑space atomic)LightTask(EventGroup‑based task state machine)- OS‑level spinlock wrappers
Designed for engine loops, schedulers, and lock‑free systems.
General utilities:
FlexSpanRandomhelpersConversionLayout(struct layout validation)BitUtilsUtils
Bit‑level operations and helpers.
$ dotnet add package RoseLeDark.Collections.Missings
- Clone the repository
- Add the project reference
- Import the namespaces you need:
using SystemEx;
using SystemEx.Numeric;
using SystemEx.Collections.Generic;
using SystemEx.Utils;Active development. New numeric types, threading primitives, and interop modules are added as needed.
Licensed under the European Union Public Licence (EUPL) v1.2. See the LICENSE.md file for details.