Skip to content

Commit 0e1d297

Browse files
committed
add collections/pointers
1 parent 9421348 commit 0e1d297

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ My curated list of cool/useful crates for game development. Crates often have st
1515
- [OS \& Filesystem](#os--filesystem)
1616
- [Strings](#strings)
1717
- [Random Numbers](#random-numbers)
18+
- [Collections \& Smart Pointers](#collections--smart-pointers)
1819
- [Miscellaneous](#miscellaneous)
1920

2021

@@ -99,6 +100,13 @@ Games need random numbers, and Rust has *many* RNG crates. Here are some I like.
99100
| [fastrand](https://crates.io/crates/fastrand) | simple, fast random number generator that uses a 64-bit state |
100101
| [rand_xoshiro](https://crates.io/crates/rand_xoshiro) | very nice random number generators, i specifically like `SplitMix64` for being very simple, fast, and with a simple 64-bit state, but it has more sophisticated generators available as well |
101102

103+
## Collections & Smart Pointers
104+
105+
| Crate | Description |
106+
| ----- | ----------- |
107+
| [pared](https://crates.io/crates/pared) | projected shared pointers (eg. get a "shared" reference to a field of a struct in an `Rc`) |
108+
| [slotmap](https://crates.io/crates/slotmap) | provides 3 containers with persistent unique keys to access stored values (basically a hash-map that generates keys for you and has O(1) lookup time)
109+
102110
## Miscellaneous
103111

104112
Haven't figured out how to categorize this stuff yet, but some of these are extremely useful.
@@ -107,7 +115,6 @@ Haven't figured out how to categorize this stuff yet, but some of these are extr
107115
| ----- | ----------- |
108116
| [ahash](https://crates.io/crates/ahash) | very fast, non-cryptographically secure hashing algorithm |
109117
| [gilrs](https://crates.io/crates/gilrs) | gamepad input library, really great API, controller layout/bindings/event handling, and haptic support |
110-
| [pared](https://crates.io/crates/pared) | projected shared pointers (eg. get a "shared" reference to a field of a struct in an `Rc`) |
111118
| [strum](https://crates.io/crates/strum) | add lots of reflection to enums (names, count, enumerate over their values, etc.), great to remove boilerplate and prepare enums for in-editor dropdown support |
112119
| [thiserror](https://crates.io/crates/thiserror) | my favorite library for creating error structs/enums with nice display implementations (reduces lots of boilerplate and can generate from-impls as well, etc.) |
113120
| [ulid](https://crates.io/crates/ulid) | i like this for guid generation, which uses the [ulid](https://github.com/ulid/spec) specification to generate 128-bit unique IDs that have nice string representations |

0 commit comments

Comments
 (0)