rust-lang/cc-rs
Rust library for build scripts to compile C/C++ code into a Rust library observed · 2026-08-28
Health v2 · maintenance only
95/100
- Activity 99
- Release rhythm 86
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 6.0
- age_days: 4324
- days_rel: 12
- days_push: 8
- n_releases_24m: 107
Adoption not part of the score
2150 stars · 609 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
cc-rs is a Rust library for Cargo build scripts that compiles C/C++/assembly/CUDA source files into a static archive to link into Rust crates. It invokes the platform's native compiler and automatically handles cross-compilation and environment variable configuration.
Use cases
- compile C code from a Rust build script
- bundle C++ sources into a Rust crate
- link native C libraries into Rust projects
- handle cross-compilation of C dependencies in Cargo
- build CUDA or assembly files for a Rust crate
When to choose
- your Rust crate needs to compile and statically link C/C++ code
- you want automatic compiler detection and cross-compilation support in build.rs
- you need a standard, widely-used solution for native code in Cargo packages
When to avoid
- you only need to link pre-built libraries without compiling sources
- you want to invoke a non-default compiler with full manual control
- your project is not built with Cargo
Facets
library · maturity stable
build-tool compiler developer-tools developer-tools compilers cross-platform rust cross-platform windows cargo build-scripts c-cpp ffi static-linking cross-compilation linux macos
10 sources
- readme: https://github.com/rust-lang/cc-rs · fetched 2026-08-28 · cc952a506dc7
- homepage: https://docs.rs/cc · fetched 2026-08-29 · 75dbaa1eace3
- site_page: https://docs.rs/ · fetched 2026-08-29 · d6ab278dde96
- site_page: https://docs.rs/crate/cc/latest · fetched 2026-08-29 · 34ba3ce8443d
- site_page: https://docs.rs/crate/cc/latest/features · fetched 2026-08-29 · f60757d1b81b
- site_page: https://docs.rs/about · fetched 2026-08-29 · 29ab7986fbf5
- site_page: https://docs.rs/about/badges · fetched 2026-08-29 · 6588cac258af
- site_page: https://docs.rs/about/builds · fetched 2026-08-29 · 811231ca4680
- site_page: https://docs.rs/about/metadata · fetched 2026-08-29 · 0dcdccb2b2b2
- site_page: https://docs.rs/about/redirections · fetched 2026-08-29 · 1b1efd93105f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| rust-lang/cc-rs | main | 95 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem