Skip to content
/ slimvec Public

Dynamic array with a smaller inline-size

Notifications You must be signed in to change notification settings

ickk/slimvec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slimvec

crates.io | docs.rs | github

SlimVec is analogous to the Standard Library's Vec collection type, however it has a smaller inline-size; the inline data is a thin pointer like thin-vec.

SlimVec implements as much of the API surface of Vec as possible. Additionally includes optional features for arbitrary, borsh, comparable, serde, & valuable.

  SlimVec<T>            Allocation
+-------------+       +-------------+
| ptr: 0xabcd | ----> | length:   2 |
+-------------+       |-------------|
                      | capacity: 4 |
                      |=============|
                      | 0:        A |
                      |-------------|
                      | 1:        B |
                      |-------------|
                      | 2: <uninit> |
                      |-------------|
                      | 3: <uninit> |
                      +-------------+

Licensing

This library may be licensed under any of the following LICENSE-ZLIB, LICENSE-MIT, or LICENSE-APACHE2 at your option.


Copyright © ickk, 2026

About

Dynamic array with a smaller inline-size

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages