#build-script #cargo-build #static #build-dependencies #compilation #native #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

94 stable releases

new 1.0.95 Apr 20, 2024
1.0.90 Mar 6, 2024
1.0.84 Nov 12, 2023
1.0.79 Jan 28, 2023
0.0.1 Dec 16, 2014

#1 in Build Utils

Download history 1980265/week @ 2024-01-03 2072404/week @ 2024-01-10 2189717/week @ 2024-01-17 2105555/week @ 2024-01-24 2200075/week @ 2024-01-31 2212172/week @ 2024-02-07 2196588/week @ 2024-02-14 2545537/week @ 2024-02-21 2573844/week @ 2024-02-28 2560500/week @ 2024-03-06 2488098/week @ 2024-03-13 2549842/week @ 2024-03-20 2330240/week @ 2024-03-27 2484182/week @ 2024-04-03 2580845/week @ 2024-04-10 2144156/week @ 2024-04-17

10,007,542 downloads per month
Used in 46,696 crates (1,950 directly)

MIT/Apache

295KB
5.5K 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