google/crubit
A bidirectional bindings generator for C++ and Rust.
https://skillcdn.ai/gh/google/crubitConnect this address to your AI to use these skills. How to connect
- Unverified
- Default branch
main - Commit
a9601ab - License
Apache-2.0
Explore this repository
Searches the original text of skills and documents; display translations are not searched.
Documents
- Best Practices Writing Rust Bindings for Existing C++ LibrariesThis document is an attempt at guidance for how Rust changes can be made to existing C++ libraries, including core foundational libraries.docs/cpp/best_practices.md
- Building the toolThey must be built with support for compression (zlib), which is the default build config.docs/cpp/building.md
- CarcinizeCarcinize (carcinize) is a migration tool that automatically converts existing C++ libraries to Rust libraries containing embedded C++ code via inline_cpp!.docs/cpp/carcinize.md
- Rust bindings for C++ classes and structsA C++ class or struct is mapped to a Rust struct with the same fields. If any subobject of the class cannot be represented in Rust, the class itself will still have bindings, but the relevant subobje…docs/cpp/classes_and_structs.md
- C++ Bindings CookbookThis document presents a collection of techniques for creating Rust bindings for C++ libraries.docs/cpp/cookbook.md
- Customizing bindings using annotationsThe Rust bindings for a C++ declaration can be customized using an attribute macro from "support/annotations.h".docs/cpp/customizing.md
- Rust bindings for C++ `enum`sA C++ enum is mapped to a Rust struct with a similar API to a Rust enum.docs/cpp/enums.md
- Rust bindings for C++ functionsRust code can call (non-member) functions defined in C++, provided that the parameter and return types are supported by Crubit:docs/cpp/functions.md
- Rust bindings for C++ librariesWhen a C++ library enables Crubit, that library can be used directly from Rust. This page documents roughly what that entails, and additional subpages (available in the left-hand navigation) document…docs/cpp/index.md
- Inline C++Crubit allows Rust code to call C++ libraries directly through generated bindings. However, some C++ interfaces cannot yet be automatically bound by Crubit, such as function templates and preprocesso…docs/cpp/inline_cpp.md
- Rust bindings for C++ operators and special member functionsHere we describe how Crubit bindings work with C++ special member functions and operator overloading (e.g. the copy constructor, or operator==) and with traits from the Rust standard library (e.g., t…docs/cpp/operator_overloading.md
- Rust bindings for C++ standard library (`std`) typesWhen generating Rust bindings for a C++ target, bindings to the C++ standard library types are provided by the cpp_std support library (which re-exports the legacy cc_std::std::). This contains a com…docs/cpp/std.md