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
- BazelCrubit is a Bazel module named rules_crubit. It provides both directions of bindings:docs/overview/bazel.md
- Build System IntegrationsCrubit works in two directions. Each direction has a build rule that you add next to the library you want to call:docs/overview/build_systems.md
- Cargo Build of CrubitThis page explains how to build Crubit's own tools with Cargo. To use Crubit in your project, start with Build System Integrations; the Bazel and CMake integrations build the tools for you.docs/overview/cargo_build.md
- CMakeCMake projects can call Rust from C++ with cpp_api_from_rust, through Corrosion, the standard way to combine CMake and Cargo. Corrosion builds your crate with Cargo, runs Crubit on it, and gives you…docs/overview/cmake.md
- Debugging CrubitCrubit is trying to solve a hard problem and is under rapid development. Things go wrong, and it's nice to have tools and methods to diagnose those problems.docs/overview/debugging.md
- Limits of CrubitCrubit aims to make Rust a viable option for engineering teams with large, pre-existing C++ codebases. There are limits to how well C++ and Rust can interoperate. Tradeoffs still exist, and there can…docs/overview/limits.md
- Overview of Crubit's C++/Rust bindingsTo call a C++ function from Rust, one can manually declare the foreign function interface (FFI) as follows:docs/overview/overview.md
- Panics and Exceptions in C++/Rust FFI bindingsSUMMARY: Crubit currently requires -fno-exceptions, and converts unwinding panics into aborts.docs/overview/panics_and_exceptions.md
- Reference SafetyThe Rust reference documents Undefined Behavior (UB) and says that "it is the programmer's responsibility when writing unsafe code to ensure that any safe code interacting with the unsafe code cannot…docs/overview/reference_safety.md
- Crubit assumptions about `extern "C"` ABI of built-in Rust typescc_bindings_from_rs makes certain assumptions about internal implementation details of the Rust compiler. In particular, cc_bindings_from_rs assumes a specific ABI of extern “C” functions that pass/r…docs/overview/rust_builtin_type_abi_assumptions.md
- Memory SafetyCrubit is designed so that mixing C++ and Rust does not give up the memory safety that Rust provides. Compared to hand-written FFI, Crubit bindings are safer in several ways:docs/overview/safety.md
- Supported FeaturesNOTE: The bug links below, of the form b/123456, are for Google-internal tracking purposes.docs/overview/status.md
- Unstable FeaturesFor each feature we use, we document the following:docs/overview/unstable_features.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