smallvec

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

Latest version: 1.13.2 registry icon
Maintenance score
74
Safety score
82
Popularity score
66
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
1.13.2 0 0 0 0 0
1.13.1 0 0 0 0 0
1.13.0 0 0 0 0 0
1.12.0 0 0 0 0 0
1.11.2 0 0 0 0 0
1.11.1 0 0 0 0 0
1.11.0 0 0 0 0 0
1.10.0 0 0 0 0 0
1.9.0 0 0 0 0 0
1.8.1 0 0 0 0 0
1.8.0 0 0 0 0 0
1.7.0 0 0 0 0 0
1.6.1 0 0 1 0 0
1.6.0 0 0 2 0 0
1.5.1 0 0 2 0 0
1.5.0 0 0 2 0 0
1.4.2 0 0 3 0 0
1.4.1 0 0 3 0 0
1.4.0 0 0 3 0 0
1.3.0 0 0 3 0 0
1.2.0 0 0 3 0 0
1.1.0 0 0 3 0 0
1.0.0 0 0 3 0 0
0.6.14 0 0 3 0 0
0.6.13 0 0 3 0 0
0.6.12 0 0 4 0 0
0.6.11 0 0 4 0 0
0.6.10 0 0 4 0 0
0.6.9 0 0 6 0 0
0.6.8 0 0 6 0 0
0.6.7 0 0 7 0 0
0.6.6 0 0 7 0 0
0.6.5 0 0 7 0 0
0.6.4 0 0 6 0 0
0.6.3 0 0 6 0 0
0.6.2 0 0 4 3 0
0.6.1 0 0 4 3 0
0.6.0 0 0 4 3 0
0.5.1 0 0 4 2 1
0.5.0 0 0 4 3 0
0.4.5 0 0 4 3 0
0.4.4 0 0 4 3 0
0.4.3 0 0 4 3 0
0.4.2 0 0 4 3 0
0.4.1 0 0 4 3 0
0.4.0 0 0 4 3 0
0.3.4 0 0 4 3 0
0.3.3 0 0 4 3 0
0.3.2 0 0 4 3 0
0.3.1 0 0 4 3 0
0.2.1 0 0 4 2 0
0.2.0 0 0 4 2 0
0.1.8 0 0 4 2 0
0.1.7 0 0 4 2 0
0.1.6 0 0 4 2 0
0.1.5 0 0 4 2 0
0.1.4 0 0 4 2 0
0.1.3 0 0 4 2 0
0.1.2 0 0 4 2 0
0.1.1 0 0 4 2 0
0.1.0 0 0 4 2 0

Stability
Latest release:

1.13.2 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

Apache-2.0   -   Apache License 2.0

Not a wildcard

Not proprietary

OSI Compliant


MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



rust-smallvec

⚠️ Note: This is the code for smallvec 2.0, which is not yet ready for release. For details about the changes in version 2.0, please see #183, #240, and #284.

The source code for the latest smallvec 1.x.y release can be found on the v1 branch. Bug fixes for smallvec 1 should be based on that branch, while new feature development should go on the v2 branch.

About smallvec

Documentation

Release notes

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

Example

use smallvec::{SmallVec, smallvec};
    
// This SmallVec can hold up to 4 items on the stack:
let mut v: SmallVec<i32, 4> = smallvec![1, 2, 3, 4];

// It will automatically move its contents to the heap if
// contains more than four items:
v.push(5);

// SmallVec points to a slice, so you can use normal slice
// indexing and other methods to access its contents:
v[0] = v[1] + v[2];
v.sort();