$ smallvec

v1.15.2

'Small vector' optimization: store up to a small number of items on the stack

Downloads: 889.0M
Recent: 183.3M
Versions: 77
Updated: June 11, 2026

Latest Update Summary

Crate

Name: smallvec New version: 2.0.0-alpha.12 Release date: 2025-11-16T20:52:31.762924Z

Crate readme

Short description Small vector optimization for Rust: store up to a small number of items on the stack

Long description smallvec provides a 'small vector' optimization for Rust, allowing the storage of a limited number of items on the stack, automatically moving to the heap once that limit is exceeded. This crate is in version 2.0, which is not yet ready for release.

Features • smallvec

Code Examples Basic usage

 use smallvec::{SmallVec, smallvec};

let mut v: SmallVec<i32, 4> = smallvec![1, 2, 3, 4];
v.push(5);
v[0] = v[1] + v[2];
v.sort();

Linkshttps://docs.rs/smallvec/https://github.com/servo/rust-smallvec/releases

https://docs.rs/smallvec/ https://api.github.com/repos/servo/rust-smallvec/releases/223701841

Release info

Release version:

Release description

Code Examples

Patch update: 1.15.1 → 1.15.2

$ DOWNLOADS TREND

517.5M889.0M

$ VERSION HISTORY

v1.15.2June 11, 2026
v1.15.1November 16, 2025
v2.0.0-alpha.11June 6, 2025

$ LINKS

$ INSTALL

cargo add smallvec

Or add to Cargo.toml: smallvec = "1.15.2"