3 ms·
> It works in Rust because the build.rs lets libraries do whatever they want during the build process, including invoking compilers for other languages. And al
by cesarb 3y ago
> It works in Rust because the build.rs lets libraries do whatever they want during the build process, including invoking compilers for other languages.
And also there's a helper library (the "gcc" crate) which does all the work of figuring out how to call the C or C++ compiler for the target platform, so that build.rs can be very small for simple cases. You don't have to do all the work yourself.
- LoganDark 3y agoDon't you mean the `cc` crate? `gcc` is its terribly-outdated predecessor.
- cesarb 3y agoIt's the same crate, it just changed its name at some point in its history. I still refer to it through its former name by force of habit.
- LoganDark 3y agoI know it's the same crate, but they changed its name. `gcc` is the predecessor of `cc` in terms of name. If you depend on `gcc` instead of `cc`, you won't have any of the new improvements.
- mistrial9 3y agogcc is not terribly outdated overall, this is FUD. specific information, please
- LoganDark 3y agoThe `gcc` crate was last published to in 2018. Use `cc`. https://docs.rs/crate/gcc/latest/builds https://docs.rs/crate/gcc/latest/builds