Let's look at the structure of Vec<T>

133 points Marekzan 31 comments

Hey guys,

so I wrote my first technical piece on rust and would like to share it with you and gather some constructive criticism.

As I was trying to understand `Vec`s inner workings I realized that its inner structure is a multi layered one with a lot of abstractions. In this article I am trying to go step by step into each layer and explain its function and why it needs to be there.

I hope you like it (especially since I tried a more story driven style of writing) and hopefully also learn something from it :).

See ya'll.

https://marma.dev/articles/2025/under-the-hood-vec-t