# johnthagen/min-sized-rust

🦀 How to minimize Rust binary size 📦 https://github.com/johnthagen/min-sized-rust

Repository: https://github.com/johnthagen/min-sized-rust
Canonical: https://ross.abutalabs.com/products/min-sized-rust
Language: Rust
License: MIT
License Family: permissive
Topics: rust, binary-size, cargo, containers, upx, lto, strip, wasm, no-std
Last push: 2025-10-03T10:20:49+00:00

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 45, release rhythm 35, longevity 100
- inputs: {"age_days": 2824, "days_push": 334, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9843, forks 247 (observed 2026-08-28T04:10:37.471114+00:00)

## What it is
A tutorial repository demonstrating techniques to minimize Rust binary size, covering Cargo profiles, symbol stripping, LTO, UPX compression, and no_std/wasm builds. It serves as a reference guide with example configurations rather than a reusable library.

## Use cases
- reduce rust binary size
- shrink rust executable for containers
- optimize cargo release profile for size
- strip symbols from rust binary
- compress rust binary with upx
- build minimal rust wasm binary

## When to choose
- you want proven, up-to-date Cargo.toml settings for small Rust binaries
- you're targeting embedded, wasm, or container images where binary size matters
- you need a quick reference for strip, LTO, and opt-level options

## When to avoid
- you need a library or tool that automates size optimization rather than documentation
- your project prioritizes runtime speed or debuggability over size
- you need guidance for languages other than Rust

## Facets
- artifact type: learning-resource
- maturity: active
- function: build-tool, compiler, developer-tools
- domain: developer-tools, performance, programming-languages
- platform: rust, windows, wasm
- tags: binary-size, cargo, lto, upx, no-std, optimization, tutorial, linux, macos, docker

## Member repositories
- johnthagen/min-sized-rust (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:37.471114+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-29T17:20:54.428041+00:00, confidence not recorded.
  - readme: https://github.com/johnthagen/min-sized-rust (fetched 2026-08-28T04:10:37.471114+00:00, sha d11202ca8238)
- Data as of 2026-08-30T08:39:29.467469+00:00.
