commit | 45b0196802f6c5644361aaebe149fbbfd87faecd | [log] [tgz] |
---|---|---|
author | Devin Jeanpierre <jeanpierreda@google.com> | Thu Jul 07 06:12:11 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jul 07 06:12:41 2022 -0700 |
tree | 8ace162a0a30c303a7b075cf166392a57560d4ab | |
parent | 409f6f6372e37fec26aede8fe9041dc87abeafba [diff] |
Use `&Database`, not `&mut Database`. This was a slight confusion on my part. If I understand it correctly, `Database` actually implements `BindingsGenerator`, meaning all these functions are callable from const references. (The caching is internal mutability.) The other change I could make is to have all of these accept `&dyn BindingsGenerator`, but for now I'm only doing that where necessary: where the function is actually implemented as a salsa query, or where it might be called from a salsa query. PiperOrigin-RevId: 459493349
Extremely experimental interop tooling for C++ and Rust.
Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.
$ apt install clang lld bazel $ git clone git@github.com:google/crubit.git $ cd crubit $ bazel build --linkopt=-fuse-ld=/usr/bin/ld.lld //rs_bindings_from_cc:rs_bindings_from_cc_impl
$ git clone https://github.com/llvm/llvm-project $ cd llvm-project $ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install $ cmake --build build -j $ # wait... $ cmake --install build $ cd ../crubit $ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl