talira

cmake (Rust crate)

Run CMake from a Rust build script to compile a native library

open sourceMIT OR Apache-2.0free

The cmake crate is a build dependency for running the CMake build tool from a Rust crate's build script to compile a native library. It uses the cmake executable unless the CMAKE environment variable names another one. It's maintained in the rust-lang organization.

Problems it solves

  • compile a C or C++ library that uses CMake as part of my Rust crate's build
  • my Rust bindings need a native dependency built with CMake
  • drive cmake from build.rs instead of writing the commands by hand

Features

  • builds a CMake project from build.rs
  • CMAKE environment variable to pick the executable

Alternatives

The same job

These do what cmake (Rust crate) does.

  1. cc Compile C, C++, assembly and CUDA from Cargo build scripts

Compare cmake (Rust crate) with the top 3