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
6d63190 - License
Apache-2.0 - Searchwords
Showing commit 6d63190
The newest commit, d7657d7, is being indexed. Until it is ready, this page and every agent are served the last indexed commit.
Explore this repository
Searches the original text of skills and documents, and the translations of skills when you search in their language.
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
- BuildingThis page is about calling C++ from Rust with rust_api_from_cpp. If you want to call Rust from C++, see C++ bindings for Rust libraries instead.docs/cpp/building.md
- Callbacks: `absl::AnyInvocable`, `absl::FunctionRef`, and `std::function_ref`Crubit supports calling C++ functions that accept or return absl::AnyInvocable from Rust. It also supports absl::FunctionRef, std::function_ref (C++26), and rs::FnRef for synchronous borrowed callbac…docs/cpp/callbacks.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++ references and lifetimesRust references have lifetimes, which let the Rust compiler check that a reference doesn't outlive the value it refers to. C++ references don't have lifetimes. To generate Rust bindings for C++ funct…docs/cpp/references_and_lifetimes.md
- Rust bindings for C++ static data membersPublic static data members of a class receive bindings. Which kind depends on the member's type and whether its value is a compile-time constant:docs/cpp/static_data_members.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
Skipped (19)
These manifests were not served. Fix them and push: the next commit is indexed again.
docs/cpp/index.mdlink_missinga link names no file of the repository (Crubit)docs/design/design.mdlink_missinga link names no file of the repository (And)docs/design/lifetime_annotations_cpp.mdlink_missing7 links name no file of the repository (The, will, “, ...)docs/design/lifetimes_static_analysis.mdlink_missing2 links name no file of the repository (The, Note,)docs/rust/maybe_uninit.mdlink_missinga link names no file of the repository (We)docs/rust/movable_types.mdlink_missinga link names no file of the repository (The)docs/types/pointer.mdlink_missinga link names no file of the repository (C++)docs/types/primitive.mdlink_missing4 links name no file of the repository (Rust, Note, Unlike, ...)docs/cpp/best_practices.mdfragment_not_founda link names a section its file does not have (classes_and_structs.md#rust_movable): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/cpp/building.mdfragment_not_founda link names a section its file does not have (../overview/bazel.md#rust_api_from_cpp): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/cpp/classes_and_structs.mdfragment_not_founda link names a section its file does not have (./cookbook.md#rust_movable): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/errors/unknown_target.mdfragment_not_founda link names a section its file does not have (unsupported_type.md#fix-wrapper): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/overview/build_systems.mdfragment_not_found3 links name sections their files do not have (bazel.md#cpp_api_from_rust, bazel.md#rust_api_from_cpp, ../index.md#test-matrix): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/overview/reference_safety.mdfragment_not_found2 links name sections their files do not have (../cpp/cookbook.md#behavior_objects, ../cpp/cookbook.md#thread_safety): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/overview/status.mdfragment_not_found7 links name sections their files do not have (../cpp/std.md#unique_ptr, ../cpp/std.md#shared_ptr, ../cpp/std.md#vector, ...): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/overview/unstable_features.mdfragment_not_founda link names a section its file does not have (../cpp/classes_and_structs.md#rust_movable): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/rust/enums.mdfragment_not_founda link names a section its file does not have (movable_types.md#movable_wrapper): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/rust/structs.mdfragment_not_founda link names a section its file does not have (movable_types.md#movable_wrapper): a fragment is the words a heading begins with, in lower case and joined by hyphensdocs/types/box.mdfragment_not_founda link names a section its file does not have (../cpp/classes_and_structs.md#rust_movable): a fragment is the words a heading begins with, in lower case and joined by hyphens