{"id":17695797,"url":"https://github.com/dasannikov/vault","last_synced_at":"2025-05-13T04:01:40.536Z","repository":{"id":194560244,"uuid":"239580064","full_name":"dasannikov/Vault","owner":"dasannikov","description":"Native data arrays for Unity3D with zero C# allocations","archived":false,"fork":false,"pushed_at":"2022-12-22T08:52:14.000Z","size":198,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T22:32:40.027Z","etag":null,"topics":["c","collections","csharp","datastructures","game","game-development","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dasannikov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-10T18:14:07.000Z","updated_at":"2023-01-19T02:39:16.000Z","dependencies_parsed_at":"2023-09-14T04:27:37.515Z","dependency_job_id":null,"html_url":"https://github.com/dasannikov/Vault","commit_stats":null,"previous_names":["dasannikov/vault"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasannikov%2FVault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasannikov%2FVault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasannikov%2FVault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasannikov%2FVault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasannikov","download_url":"https://codeload.github.com/dasannikov/Vault/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253870865,"owners_count":21976613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","collections","csharp","datastructures","game","game-development","unity","unity3d"],"created_at":"2024-10-24T14:06:59.539Z","updated_at":"2025-05-13T04:01:40.505Z","avatar_url":"https://github.com/dasannikov.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vault Libray for Unity3D\n\n**DOWNLOAD:** [Latest build (Unity package)](https://github.com/dasannikov/Vault/releases)\n\n`Vault.List` - Continuous data array with dynamic size similar to C++ `std::vector\u003cT\u003e` or C# `List\u003cT\u003e`. It uses an optimized native array implemented on `C` that is even faster than STL C++ containers (apporix. 10% faster) and has zero C# memory allocations.\n\n## Supported platforms:\n- Standalone Mono. Windows/MacOS/Linux\n- Standalone IL2CPP. Windows/MacOS/Linux\n- Mobile. iOS/Android\n- Other through IL2CPP or specific shared libraries\n\n## Advantages:\n- Doesn't use any Unity3D features. Can work with any C# code\n- Continuous data array with dynamic size\n- Fast and small prebuild native libraries\n- No C# memory allocations and C# GC\n- You manage your memory (`Free` means deleting container and releasing memory)\n\n## Usage\n`Vault.List` is a continuous container with dynamic size. Similar to C++ `std::vector\u003cT\u003e` or C# `List\u003cT\u003e` or Unity's `NativeList\u003cT\u003e`\n\n```csharp\n\n// New list with default initializer\n// Vault.List is a struct. Zero allocations in C# memory\nvar vecArr = new Vault.List\u003cVector2\u003e(10, new Vector2(1.0f, 1.0f));\n\n// Set element value\nvecArr[9] = new Vector2(101f, 102f);\nvecArr[0] = new Vector2(101f, 102f);\n\n// Resize list\nvecArr.Resize(14);\n\n// Add element to list.\nvecArr.Add(new Vector2(21f, 22f));\n\n// Fast remove element by swap with last element\nvecArr.RemoveBySwap(1);\n\n// Relatively slow remove element by memmove\nvecArr.Remove(1);\n\n// Swap elements\nvecArr.Swap(0, 1);\n\n// Clear list\nvecArr.Clear();\n\n// Free list after use\n// Completely release unmanaged memory\nvecArr.Free();\n\n```\n\n## Performance\nPerformance (IL2CPP Builds) is similar (±10%) to Unit's `NativeList\u003cT\u003e`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasannikov%2Fvault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasannikov%2Fvault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasannikov%2Fvault/lists"}