• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{{#title CMake — Rust ♡ C++}}
2# CMake
3
4There is not an officially endorsed CMake setup for CXX, but a few developers
5have shared one that they got working. You can try one of these as a starting
6point. If you feel that you have arrived at a CMake setup that is superior to
7what is available in these links, feel free to make a PR adding it to this list.
8
9<br>
10
11---
12
13- **<https://github.com/XiangpengHao/cxx-cmake-example>**
14
15  - Supports cross-language link time optimization (LTO)
16
17---
18
19- **<https://github.com/david-cattermole/cxx-demo-example>**
20
21  - Includes a cbindgen component
22  - Tested on Windows 10 with MSVC, and on Linux
23
24---
25
26- **<https://github.com/trondhe/rusty_cmake>**
27
28  - Alias target that can be linked into a C++ project
29  - Tested on Windows 10 with GNU target, and on Linux
30
31---
32
33- **<https://github.com/geekbrother/cxx-corrosion-cmake>**
34
35  - Improved rusty_cmake CMake file to use modern C++
36  - Rich examples of using different primitive types and Rust's Result return to C++
37  - MacOS and Linux only
38
39---
40
41- **<https://github.com/paandahl/cpp-with-rust>**
42
43  - Same blobstore example as the official demo, but inverted languages
44  - Minimal CMake configuration
45  - Tested on Linux, macOS, and Windows
46
47---
48