commit | 52a14c31dae3087222f16427c5a2feebdb9587cf | [log] [tgz] |
---|---|---|
author | Devin Jeanpierre <jeanpierreda@google.com> | Wed Jun 29 19:12:11 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Jun 29 19:12:36 2022 -0700 |
tree | 7e5ec0a6dfaf69f722b35e20c9370e58af80df4c | |
parent | e9850a7cbfdf739166773e45c92f4c6fc1d27673 [diff] |
Use salsa in src_code_gen.rs. This only actually changes generate_func into a query for now -- notice that it's retrieved in two places, so this is actually saving work! More importantly, this shows the shape of the change. Any given function can be migrated to a query by changing its parameter from a `&mut Database` to a `&dyn BindingsGenerator`. A quick note on `PtrEq` -- this used to be possible without this; discussion at https://salsa.zulipchat.com/#narrow/stream/145099-general/topic/Return.20values.20that.20aren't.20comparable/near/286482700. PiperOrigin-RevId: 458114855
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