commit | caa8f49a3767e84efde63bc3cc06880b06a1ddac | [log] [tgz] |
---|---|---|
author | Lukasz Anforowicz <lukasza@google.com> | Fri Nov 18 16:46:03 2022 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Nov 18 16:46:40 2022 -0800 |
tree | a747ef6e35256cd9dfb31c125df6ffa39ac7b88f | |
parent | bad99636a426792298ccebcedcc67ac87d5043a3 [diff] |
Change type of `CcSnippet::rs` from `Option<TokenStream>` to `TokenStream`. I've originally used `Option<TokenStream>` to test via `Option::is_none` that there are no Rust snippets in certain unit tests. I don't know how I managed to miss that the same can be accomplished via `TokenStream::is_empty` (while significantly simplifying big chunks of code). PiperOrigin-RevId: 489589960
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