Marcel Hlopko | e8f1c4e | 2021-07-28 18:12:49 +0000 | [diff] [blame] | 1 | # Crubit: C++/Rust Bidirectional Interop Tool |
| 2 | |
Marcel Hlopko | d391661 | 2022-06-03 02:25:50 -0700 | [diff] [blame] | 3 | [](https://buildkite.com/bazel/crubit) |
| 4 | |
Marcel Hlopko | e8f1c4e | 2021-07-28 18:12:49 +0000 | [diff] [blame] | 5 | Extremely experimental interop tooling for C++ and Rust. |
| 6 | |
Marcel Hlopko | ac46bf9 | 2022-03-25 15:27:22 +0000 | [diff] [blame] | 7 | Please don't use, this is an experiment and we don't yet know where will it take |
Devin Jeanpierre | 4405a62 | 2022-10-21 00:24:57 -0700 | [diff] [blame] | 8 | us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point. |
Dmitri Gribenko | 184a80a | 2022-05-23 14:55:43 -0700 | [diff] [blame] | 9 | |
| 10 | ## Building Crubit |
| 11 | |
| 12 | ``` |
| 13 | $ apt install clang lld bazel |
| 14 | $ git clone git@github.com:google/crubit.git |
| 15 | $ cd crubit |
| 16 | $ bazel build --linkopt=-fuse-ld=/usr/bin/ld.lld //rs_bindings_from_cc:rs_bindings_from_cc_impl |
Matthew Riley | 03a01e3 | 2022-05-24 10:16:04 -0700 | [diff] [blame] | 17 | ``` |
| 18 | |
| 19 | ### Using a prebuilt LLVM tree |
| 20 | |
| 21 | ``` |
| 22 | $ git clone https://github.com/llvm/llvm-project |
| 23 | $ cd llvm-project |
Lukasz Anforowicz | 4c77264 | 2022-05-30 11:11:02 -0700 | [diff] [blame] | 24 | $ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install |
Matthew Riley | 03a01e3 | 2022-05-24 10:16:04 -0700 | [diff] [blame] | 25 | $ cmake --build build -j |
| 26 | $ # wait... |
Lukasz Anforowicz | 4c77264 | 2022-05-30 11:11:02 -0700 | [diff] [blame] | 27 | $ cmake --install build |
Matthew Riley | 03a01e3 | 2022-05-24 10:16:04 -0700 | [diff] [blame] | 28 | $ cd ../crubit |
Lukasz Anforowicz | 4c77264 | 2022-05-30 11:11:02 -0700 | [diff] [blame] | 29 | $ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl |
| 30 | ``` |