This module provides a single place for all aspects, rules, and macros that are meant to have stardoc generated documentation.

Rules

rust_bindgen

Generates a rust source file from a cc_library and a header.

name

A unique name for this target.

bindgen_flags

Flags to pass directly to the bindgen executable. See https://rust-lang.github.io/rust-bindgen/ for details.

cc_lib

The cc_library that contains the .h file. This is used to find the transitive includes.

clang_flags

Flags to pass directly to the clang executable.

header

The .h file to generate bindings for.

rust_bindgen_toolchain

The tools required for the rust_bindgen rule.

name

A unique name for this target.

bindgen

The label of a bindgen executable.

clang

The label of a clang executable.

libclang

A cc_library that provides bindgen's runtime dependency on libclang.

libstdcxx

A cc_library that satisfies libclang's libstdc++ dependency.

rustfmt

The label of a rustfmt executable. If this is provided, generated sources will be formatted.

Macros and Functions

rust_bindgen_library

Generates a rust source file for header, and builds a rust_library.

Arguments are the same as rust_bindgen, and kwargs are passed directly to rust_library.

name

A unique name for this target.

header

The label of the .h file to generate bindings for.

cc_lib

The label of the cc_library that contains the .h file. This is used to find the transitive includes.

bindgen_flags

Flags to pass directly to the bindgen executable. See https://rust-lang.github.io/rust-bindgen/ for details.

clang_flags

Flags to pass directly to the clang executable.

kwargs

Arguments to forward to the underlying rust_library rule.

rust_bindgen_repositories

Declare dependencies needed for bindgen.