# servo/rust-smallvec

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

Repository: https://github.com/servo/rust-smallvec
Canonical: https://ross.abutalabs.com/products/rust-smallvec
Language: Rust
License: Apache-2.0
License Family: permissive
Last push: 2026-08-26T18:56:00+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 76, longevity 100
- inputs: {"age_days": 4168, "days_push": 7, "days_rel": 83, "gap_med": 62, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1695, forks 191 (observed 2026-08-28T04:05:23.711757+00:00)

## What it is
A Rust library providing SmallVec, a vector-like collection that stores a small number of items inline on the stack and spills to the heap only when it exceeds capacity. It is a drop-in performance optimization for reducing heap allocations in hot code paths.

## Use cases
- avoid heap allocations for small collections in rust
- store a few items on the stack instead of a vec
- optimize hot loops that allocate small vectors
- reduce allocator pressure in performance-critical rust code
- drop-in replacement for Vec with inline storage

## When to choose
- you frequently create small vectors whose length is usually below a known bound
- allocation overhead shows up in profiling
- you want Vec-like API with stack storage

## When to avoid
- collections are usually large or unbounded
- you need the exact size of Vec or rely on pointer identity
- you are not writing Rust

## Facets
- artifact type: library
- maturity: active
- function: concurrency, developer-tools
- domain: developer-tools, performance
- platform: rust, cross-platform
- tags: smallvec, stack-allocation, data-structures, no-std

## Member repositories
- servo/rust-smallvec (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:23.711757+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:37:57.462388+00:00, confidence not recorded.
  - readme: https://github.com/servo/rust-smallvec (fetched 2026-08-28T04:05:23.711757+00:00, sha a1142c6ed883)
- Data as of 2026-08-30T08:39:29.467469+00:00.
