# google/crubit

A bidirectional bindings generator for C++ and Rust.

Repository: https://github.com/google/crubit
Canonical: https://ross.abutalabs.com/products/crubit
Homepage: https://crubit.rs/
Language: C++
License: NOASSERTION
License Family: other
Last push: 2026-09-03T00:24:11+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 35, longevity 100
- inputs: {"age_days": 1645, "days_push": 0, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1094, forks 79 (observed 2026-09-03T02:15:12.407607+00:00)

## What it is
Crubit is a bidirectional bindings generator that automatically creates FFI bindings between C++ and Rust, enabling code in either language to call the other. It maps Rust structs, functions, and traits (like Display) to C++ equivalents and vice versa, aiming to integrate the two ecosystems.

## Use cases
- call Rust functions from C++ code
- call C++ APIs from Rust
- generate FFI bindings between C++ and Rust automatically
- migrate a C++ codebase incrementally to Rust
- use Rust libraries in an existing C++ project
- expose C++ structs and functions to Rust with idiomatic types

## When to choose
- you need automated, type-safe interop between C++ and Rust rather than hand-written bindings
- you are incrementally introducing Rust into a large C++ codebase (or vice versa)
- you want bindings that map references, optionals, smart pointers, and string types idiomatically

## When to avoid
- you only need simple C ABI bindings that cbindgen or bindgen already handle
- your project requires only stable, long-term-supported tooling - Crubit's supported feature set is still evolving
- you work in a pure Rust or pure C++ codebase with no cross-language needs

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, compiler, code-review
- domain: developer-tools, programming-languages, cross-platform
- platform: cpp, rust, windows
- tags: ffi, bindings-generator, interop, cxx, rust-bindings, language-interop, linux, macos

## Member repositories
- google/crubit (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:12.407607+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:49:12.867639+00:00, confidence not recorded.
  - readme: https://github.com/google/crubit (fetched 2026-09-03T02:15:12.407607+00:00, sha 3dd38c37ceec)
  - homepage: https://crubit.rs/ (fetched 2026-08-29T12:51:22.355057+00:00, sha fb712a775bd2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
