# corrosion-rs/corrosion

Marrying Rust and CMake - Easy Rust and C/C++ Integration!

Repository: https://github.com/corrosion-rs/corrosion
Canonical: https://ross.abutalabs.com/products/corrosion-rs-corrosion
Homepage: https://corrosion-rs.github.io/corrosion/
Language: CMake
License: MIT
License Family: permissive
Topics: cmake-cargo, cmake, cargo, rust, cplusplus, cpp, c, build-tool, build-systems, build-system, cross-compilation
Last push: 2026-05-16T17:33:41+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 54, longevity 100
- inputs: {"age_days": 3101, "days_push": 109, "days_rel": 228, "gap_med": 85.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1484, forks 148 (observed 2026-08-28T04:04:51.331199+00:00)

## What it is
Corrosion is a tool for integrating Rust into existing CMake projects, automatically importing Rust executables, static libraries, and dynamic libraries as CMake targets. It simplifies linking Rust and C/C++ code in a single build, including cross-compilation scenarios.

## Use cases
- build a C++ project that links a Rust library
- integrate Rust crates into an existing CMake build system
- import Rust executables and libraries as CMake targets
- cross-compile a mixed Rust and C/C++ codebase
- link C/C++ libraries into a Rust executable built with CMake
- replace manual cargo invocations in CMake builds

## When to choose
- you have an existing CMake project and want to add Rust components
- you need Rust and C/C++ code built together with one build system
- you want simple cross-compilation of mixed Rust/C++ projects

## When to avoid
- your project is pure Rust and can use Cargo directly
- your build system is not CMake (e.g. Bazel, Meson, Make)
- you only need to call Rust tools from scripts rather than integrate builds

## Facets
- artifact type: cli-tool
- maturity: active
- function: build-tool, developer-tools
- domain: developer-tools, cross-platform, programming-languages
- platform: cross-platform, cpp, rust
- tags: cmake, cargo, rust-cpp-integration, cross-compilation, ffi, build-tool

## Member repositories
- corrosion-rs/corrosion (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:51.331199+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-30T08:32:48.115809+00:00, confidence not recorded.
  - readme: https://github.com/corrosion-rs/corrosion (fetched 2026-08-28T04:04:51.331199+00:00, sha 1bb72a8f5a81)
  - homepage: https://corrosion-rs.github.io/corrosion/ (fetched 2026-08-29T11:40:16.514906+00:00, sha 175fd21240ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
