bazel /
crubit /
b2cd021dbbf3a9cb53838255db86df24b25c6610 Add `is_trivial_abi` bit to Record IR.
Without a way to look up the Record for a given CcType/RsType, there is no way to make this influence code generation of actual calls which use this type. So this is currently unused.
However, this may be enough, by itself, to mark a type as trivially relocatable. A type with this bit can be passed through registers, which means that, by definition, its memory location doesn't matter, and it can be trivially relocated.
For example, see this godbolt link showing that marking a class as trivial_abi breaks it by causing it to get relocated!
https://godbolt.org/z/voMa5TPKq
PiperOrigin-RevId: 400123681
6 files changed
tree: ab03d63e84528ae4a9d1d2e31ebae3f4c1213db1
- rs_bindings_from_cc/
- CODE_OF_CONDUCT
- CONTRIBUTING
- LICENSE
- README.md
README.md
Crubit: C++/Rust Bidirectional Interop Tool
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.