slotmap Rust crate by Orson Peters.
- Zig 100%
| src |
sparse_secondary: Fix KeyIterator to return K instead of Entry
|
|
| .gitignore | feat!: Port the data structures and their main methods | |
| build.zig | Code cleanup and validation ( #3 ) | |
| build.zig.zon | Code cleanup and validation ( #3 ) | |
| LICENSE | feat!: Port the data structures and their main methods | |
| LICENSE-ORIGINAL | feat!: Port the data structures and their main methods | |
| README.md | readme: Fix misdocumentation | |
slotmap-zig
A Zig v0.16.0 port of the popular slotmap Rust crate,
providing two containers with persistent uniqie keys to access stored values:
slotmap.basic and slotmap.dense. Upon insertion a key is returned, which can
be used to later access the value. Insertion, deletion, and access all take O(1) time with
low overhead. Great for storing collections of objects that need stable, safe references but
have no clear ownership otherwise, such as game entities or graph nodes.
Two secondary maps slotmap.secondary and slotmap.sparse_secondary are also provided,
which allow you to map associated data to the keys created by one of the slot maps.
License
This project is licensed under the Zlib License - see the LICENSE file for details.
This project is a Zig port of the Rust slotmap crate, originally authored by Orson Peters. The original slotmap source code is also licensed under the Zlib License. A copy of the original license is included in LICENSE-ORIGINAL.