#build-script #cargo-build #static #native #build-dependencies #compilation #compile

build cc

A build-time dependency for Cargo build scripts to assist in invoking the native C compiler to compile native C code into a static archive to be linked into Rust code

158 stable releases

new 1.2.14 Feb 14, 2025
1.2.11 Jan 31, 2025
1.2.6 Dec 27, 2024
1.2.2 Nov 29, 2024
0.0.1 Dec 16, 2014

#1 in Build Utils

Download history 3162166/week @ 2024-10-26 3338656/week @ 2024-11-02 3327536/week @ 2024-11-09 3362549/week @ 2024-11-16 2953428/week @ 2024-11-23 3420775/week @ 2024-11-30 3798108/week @ 2024-12-07 3493819/week @ 2024-12-14 1974156/week @ 2024-12-21 2208990/week @ 2024-12-28 3424662/week @ 2025-01-04 3842616/week @ 2025-01-11 3565735/week @ 2025-01-18 3575009/week @ 2025-01-25 4107986/week @ 2025-02-01 4252067/week @ 2025-02-08

16,162,500 downloads per month
Used in 42,310 crates (2,342 directly)

MIT/Apache

435KB
10K SLoC

cc-rs

A library for Cargo build scripts to compile a set of C/C++/assembly/CUDA files into a static archive for Cargo to link into the crate being built. This crate does not compile code itself; it calls out to the default compiler for the platform. This crate will automatically detect situations such as cross compilation and various environment variables and will build code appropriately.

Refer to the documentation for detailed usage instructions.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cc-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies