# cc

> Compile C, C++, assembly and CUDA from Cargo build scripts

Source: https://talira.ai/catalog/cc-4mf37zc6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / build / native compilation](https://talira.ai/categories/developer-tools/build/native-compilation), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [The Rust Project](https://talira.ai/orgs/rust-project.md)

cc (cc-rs) is a Rust library for Cargo build scripts that compiles a set of C, C++, assembly or CUDA files into a static archive, which Cargo then links into the crate being built. It doesn't compile code itself: it calls the platform's default compiler, and it detects cross compilation and the usual compiler environment variables so the same build script works across targets. It is maintained under the Rust project's GitHub organisation.

## Links

- GitHub: https://github.com/rust-lang/cc-rs
- Docs: https://docs.rs/cc

## Problems it solves

- compile some C code into my Rust crate from a build script
- link a bundled C library into a Rust crate so it builds on every target
- cross-compile the C parts of a Rust project without hand-written makefiles

## Features

- Compiles C, C++, assembly and CUDA files into a static archive from build.rs
- Calls the platform's default compiler rather than bundling one
- Detects cross compilation and compiler environment variables automatically
- Optional jobserver support for parallel compilation

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 1.00, adoption 0.67, momentum 0.36, community 1.00, backing 0.30, extensibility 0.00.

- last commit 3 days ago
- 190 commits in the last 90 days
- latest release cc-v1.12.0 3 days ago
- 2.2k GitHub stars
- 355 contributors
- backed by The Rust Project

## Alternatives

- [cmake (Rust crate)](https://talira.ai/catalog/cmake-rust-crate-zx0c5hsm.md): Run CMake from a Rust build script to compile a native library

## Sources

[^1]: https://github.com/rust-lang/cc-rs/blob/main/README.md (checked 28 Nov 2026)
