commit | a691cf5e83c84414b15f1bbf16d675587886f55e | [log] [tgz] |
---|---|---|
author | Lukasz Anforowicz <lukasza@google.com> | Wed Mar 08 12:24:33 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Mar 08 12:25:11 2023 -0800 |
tree | 49001ff60284ecda7e5089c71eac38ee477a753c | |
parent | 73110861829be39fe8bc868492809bd5635af6e1 [diff] |
Refactor `format_fn` to make parameter processing easier to understand. Notable changes: - More accurately naming things `...args` vs `...params` - Distinguishing between `main_api_...` and `thunk_...` snippets (e.g. between `main_api_params` and `thunk_params`) even if right now they expand to the same snippet. - Storing parameter's name and type together in a new `Param` struct. This makes it straightforward to correlate parameter to its type (without having to `zip` things together). PiperOrigin-RevId: 515109173
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