# cmake (Rust crate)

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

Source: https://talira.ai/catalog/cmake-rust-crate-zx0c5hsm
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[^2][^3][^4]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT OR Apache-2.0).
- Free tier: yes[^1]
- Backed by: [The Rust Project](https://talira.ai/orgs/rust-project.md)

The cmake crate is a build dependency for running the [CMake](https://talira.ai/catalog/cmake-k3qq1fry.md) 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.

## Links

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

## 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

## Trust

Overall: 0.49 out of 1.
Signals: maintenance 0.69, adoption 0.52, momentum 0.17, community 0.78, backing 0.30, extensibility 0.00.

- last commit 6 days ago
- 14 commits in the last 90 days
- latest release v0.1.58 8 months ago
- 384 GitHub stars
- 86 contributors
- backed by The Rust Project

## Related

- Works with [CMake](https://talira.ai/catalog/cmake-k3qq1fry.md)
- Works with [Cargo](https://talira.ai/catalog/cargo-n4s7zm2g.md)

## Alternatives

- [cc](https://talira.ai/catalog/cc-4mf37zc6.md): Compile C, C++, assembly and CUDA from Cargo build scripts

## Sources

[^1]: https://github.com/rust-lang/cmake-rs/blob/main/README.md (checked 29 Nov 2026)
[^2]: https://github.com/rust-lang/cmake-rs/blob/main/Cargo.toml (checked 29 Nov 2026)
[^3]: https://github.com/rust-lang/cmake-rs/blob/main/LICENSE-MIT (checked 29 Nov 2026)
[^4]: https://github.com/rust-lang/cmake-rs/blob/main/LICENSE-APACHE (checked 29 Nov 2026)
