blob: ca79516abbb5d3991ec966a607f5101323e1e6be [file] [log] [blame] [view]
Marcel Hlopkoe8f1c4e2021-07-28 18:12:49 +00001# Crubit: C++/Rust Bidirectional Interop Tool
2
Marcel Hlopkod3916612022-06-03 02:25:50 -07003[![Build status](https://badge.buildkite.com/7a57a14e68aa3a0ab70972cbf2a35fd79d342ba152fee4a5b4.svg)](https://buildkite.com/bazel/crubit)
4
Marcel Hlopkoe8f1c4e2021-07-28 18:12:49 +00005Extremely experimental interop tooling for C++ and Rust.
6
Marcel Hlopkoac46bf92022-03-25 15:27:22 +00007Please don't use, this is an experiment and we don't yet know where will it take
Devin Jeanpierre4405a622022-10-21 00:24:57 -07008us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.
Dmitri Gribenko184a80a2022-05-23 14:55:43 -07009
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 Riley03a01e32022-05-24 10:16:04 -070017```
18
19### Using a prebuilt LLVM tree
20
21```
22$ git clone https://github.com/llvm/llvm-project
23$ cd llvm-project
Lukasz Anforowicz4c772642022-05-30 11:11:02 -070024$ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
Matthew Riley03a01e32022-05-24 10:16:04 -070025$ cmake --build build -j
26$ # wait...
Lukasz Anforowicz4c772642022-05-30 11:11:02 -070027$ cmake --install build
Matthew Riley03a01e32022-05-24 10:16:04 -070028$ cd ../crubit
Lukasz Anforowicz4c772642022-05-30 11:11:02 -070029$ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl
30```