SwiftCollections 9.0.1
dotnet add package SwiftCollections --version 9.0.1
NuGet\Install-Package SwiftCollections -Version 9.0.1
<PackageReference Include="SwiftCollections" Version="9.0.1" />
<PackageVersion Include="SwiftCollections" Version="9.0.1" />
<PackageReference Include="SwiftCollections" />
paket add SwiftCollections --version 9.0.1
#r "nuget: SwiftCollections, 9.0.1"
#:package SwiftCollections@9.0.1
#addin nuget:?package=SwiftCollections&version=9.0.1
#tool nuget:?package=SwiftCollections&version=9.0.1
SwiftCollections
![]()
Specialized .NET collections for games, simulations, and tools where data layout and predictable performance matter.
Iterate packed agent data, keep generation-checked references to live objects, query a 2D or 3D world, and reuse storage between updates. SwiftCollections gives you control over allocation, identity, and iteration in an engine-agnostic library built for demanding runtime workloads.
Get started · Choose a collection · Explore the API
Why SwiftCollections?
- Keep hot data close. Lists, hash tables, dense sets, sparse maps, and ticket-based containers offer storage choices for lookup and packed iteration.
- Give identities a clear owner. Stable slots, generation-checked tickets, and externally keyed stores support registrations, agent records, and optional component data.
- Find nearby objects. BVH, spatial hash, quadtree, and octree indexes cover 2D and 3D broad-phase queries with caller-owned result buffers.
- Build deterministic worlds. Fixed-point spatial queries powered by
FixedMathSharp complement the
core
System.Numericsbackends. - Reuse storage deliberately. Collection pools and explicit clearing controls help manage allocations, retained references, and ownership boundaries.
- Persist the rules with the data. State-backed JSON and MemoryPack serialization include comparer persistence for supported collection owners; Lean packages keep JSON support without the MemoryPack runtime.
Benchmarks and enforced 100% line, branch, and executable-method coverage support the implementation. Use the BCL collections for general-purpose code, and choose SwiftCollections when its storage or ownership model fits your workload.
Install
Start with the core package:
dotnet add package SwiftCollections
Choose the package family that fits your application:
| Need | Package |
|---|---|
| Core collections with MemoryPack | SwiftCollections |
| Core collections without the MemoryPack runtime | SwiftCollections.Lean |
| FixedMathSharp spatial queries with MemoryPack | SwiftCollections.FixedMathSharp |
| FixedMathSharp spatial queries without the MemoryPack runtime | SwiftCollections.FixedMathSharp.Lean |
For deterministic fixed-point spatial queries, install the companion. NuGet brings in the matching SwiftCollections and FixedMathSharp packages:
dotnet add package SwiftCollections.FixedMathSharp
Use the matching .Lean packages as a pair. Lean keeps the collection APIs but
removes the MemoryPack runtime; it is useful when your application owns its
serialization stack or wants the smaller dependency surface.
A quick taste
SwiftTicketMap<T> gives you stable slots with generation-checked tickets.
Removal invalidates the current ticket, and ordinary slot reuse advances its
generation:
using System;
using SwiftCollections;
var actors = new SwiftTicketMap<string>();
SwiftTicket player = actors.Add("player");
if (actors.TryGet(player, out string actor))
{
Console.WriteLine(actor);
}
actors.Remove(player);
bool stillRegistered = actors.TryGet(player, out _); // false
Explore packed updates and optional components in the collection guide. It shows how dense ticket maps and externally keyed stores fit those workloads, with examples and the ownership, storage, and lifetime contracts for each choice.
Learn more
The documentation site brings together working examples, collection tradeoffs, and the full API reference:
| Explore | Start here |
|---|---|
| Storage, identity, dense iteration, and clearing | Collections guide |
| 2D/3D indexing and deterministic fixed-point queries | Spatial queries |
| Rentals, reuse, and change notifications | Pools and observables |
| State, comparer persistence, and host diagnostics | Serialization and diagnostics |
For existing projects, see the migration guide. For benchmarks, coverage, and local development, see Contributing and the coverage report.
Using Unity? The maintained
SwiftCollections-Unity packages
add Unity-serializable adapters, Bounds conversions, GameObject pooling, and
FixedMathSharp integration.
Compatibility
The libraries target netstandard2.1 and net10.0. CI validates Standard and
Lean builds on Windows and Linux.
Questions and discussion are welcome in the Discord community. SwiftCollections is available under the MIT License. See Support, the Code of Conduct, and Security for help and reporting guidance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Chronicler.Core (>= 1.0.0)
- Chronicler.Diagnostics (>= 1.0.0)
- MemoryPack (>= 1.21.4)
- System.Text.Json (>= 10.0.9)
-
net10.0
- Chronicler.Core (>= 1.0.0)
- Chronicler.Diagnostics (>= 1.0.0)
- MemoryPack (>= 1.21.4)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on SwiftCollections:
| Package | Downloads |
|---|---|
|
GridForge
A high-performance, deterministic rectangular and hex-prism voxel grid system for spatial partitioning, simulation, and game development. |
|
|
SwiftCollections.FixedMathSharp
FixedMathSharp companion package for SwiftCollections query volume integrations. |
|
|
Gravitas
High-performance, engine-agnostic fixed-point physics for deterministic 2D, 3D, and mixed-dimension lockstep games and simulations. |
|
|
Trailblazer
Deterministic, framework-agnostic pathfinding and navigation for lockstep simulations and games. Trailblazer combines FixedMathSharp fixed-point math, GridForge voxel navigation charts, A* paths, flow fields, reusable guide caching, transition-aware routing, steering, turning, locomotion, heightmaps, and Chronicler serialization support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.1 | 0 | 11/26/2026 |
| 9.0.0 | 100 | 11/24/2026 |
| 8.0.0 | 298 | 11/5/2026 |
| 7.0.0 | 483 | 8/5/2026 |
| 6.0.0 | 252 | 7/1/2026 |
| 5.1.1 | 239 | 6/24/2026 |
| 5.1.0 | 239 | 6/22/2026 |
| 5.0.2 | 235 | 6/20/2026 |
| 5.0.1 | 326 | 6/16/2026 |
| 5.0.0 | 190 | 6/10/2026 |
| 4.1.1 | 326 | 5/30/2026 |
| 4.1.0 | 245 | 5/26/2026 |
| 4.0.5 | 292 | 5/19/2026 |
| 4.0.4 | 278 | 5/10/2026 |
| 4.0.3 | 213 | 5/7/2026 |
| 4.0.2 | 229 | 5/3/2026 |
| 4.0.1 | 252 | 4/22/2026 |
| 4.0.0 | 274 | 4/16/2026 |
| 3.0.0 | 276 | 4/3/2026 |
| 2.0.0 | 206 | 3/9/2026 |